diff --git a/osbuild/objectstore.py b/osbuild/objectstore.py index 4a19ce9f..922d5eec 100644 --- a/osbuild/objectstore.py +++ b/osbuild/objectstore.py @@ -283,14 +283,22 @@ class HostTree: self._root = self.store.tempdir(prefix="host") root = self._root.name - # Create a bare bones root file system - # with just /usr mounted from the host + # Create a bare bones root file system. Starting with just + # /usr mounted from the host. usr = os.path.join(root, "usr") os.makedirs(usr) + # Also add in /etc/containers, which will allow us to access + # /etc/containers/policy.json and enable moving containers + # (skopeo): https://github.com/osbuild/osbuild/pull/1410 + # If https://github.com/containers/image/issues/2157 ever gets + # fixed we can probably remove this bind mount. + etc_containers = os.path.join(root, "etc", "containers") + os.makedirs(etc_containers) # ensure / is read-only mount(root, root) mount("/usr", usr) + mount("/etc/containers", etc_containers) @property def tree(self) -> os.PathLike: