Skip to content

Conversation

@Madeeks
Copy link

@Madeeks Madeeks commented Oct 3, 2025

This PR proposes an alternative procedure to import images from local Podman repositories.

Instead of exporting a Podman container filesystem to tar and re-extracting said archive, the podman unshare and podman mount commands are used to mount the container filesystem in a host-accessible location which can in turn be used as target for image configuration and squashing.

The new procedure

  • is much faster: it skips tar creation and extraction, leaving squashfs creation as the only time-consuming part of the import
  • is conceptually more consistent with the process of importing remote images, where layers are mounted with overlayfs to generate the rootfs to be squashed.

The new procedure is accessed through the -x / --extract-mode option to enroot import, e.g. enroot import -x mount podman://ubuntu:latest.
The previous procedure based on tar export and extraction remains as default.

@flx42
Copy link
Member

flx42 commented Oct 11, 2025

Is your goal to generate a squashfs and distribute it? Or is your next step enroot create with the squashfs imported from podman?
Because if your use case is the latter, we should consider adding this feature for the enroot load path instead I think.

@Madeeks
Copy link
Author

Madeeks commented Oct 12, 2025

I originally developed this only to generate the squashfs, as I was not aware of the introduction of enroot load until recently.

When I have a bit of time I can look into extending the new procedure for that command as well.

I still see value in having the possibility of creating a squashfs to move around, so I would prefer to provide the new procedure to both import and load instead of moving it only in the load path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants