Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support podman's external rootfs management #737

Merged
merged 2 commits into from
Apr 28, 2024

Conversation

ftyghome
Copy link
Contributor

The podman-run command supports external rootfs management by using the --rootfs flag (documentation).
By specifying the --rootfs flag, the first parameter of podman-run will be the path of container's rootfs, instead of the specification of image. This patch makes the compose file parser able to recognize the "rootfs" field, and produce the correct args for podman-run command.

podman_compose.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@p12tic p12tic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. It looks good in principle.

Unit tests are needed. pytests/test_container_to_args.py already tests some of the ways to call container_to_args.

@ftyghome ftyghome force-pushed the feat_rootfs branch 3 times, most recently from 860ccc7 to ffafaee Compare March 16, 2024 08:16
@ftyghome
Copy link
Contributor Author

ftyghome commented Mar 16, 2024

Hi!
I have moved the podman-specific key "rootfs" under the "x-podman" field, as the "uidmap" and "gidmap" did.
Unit tests are added, and I added a document about the extensions in the docs/Extensions.md.
Thanks for reviewing:)

Copy link
Collaborator

@p12tic p12tic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

I've now realized that there are two ways to supply podman-specific config keys. This will be addressed in the future in a separate PR.

@p12tic
Copy link
Collaborator

p12tic commented Apr 28, 2024

Rebased.

@p12tic p12tic merged commit 0a6c057 into containers:main Apr 28, 2024
8 checks passed
@p12tic
Copy link
Collaborator

p12tic commented Apr 28, 2024

@ftyghome FYI I updated location of the rootfs config in #917.

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