-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: add cfg.path to containerd-rootless.sh PATH #145
Conversation
Apologies if this is a silly question but is there a reason why we can't just add shadow-utils (which provides newuidmap) as a runtime dependency? I think it's |
Hi @RobbieBuxton, thanks for taking a look.
According to this discussion on setting up rootless podman:
And in |
Ah that makes sense thanks! I went down the rabbit hole and it definitely seems like it's a bit of a mess on NixOS atm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for posterity, here's another reference to the |
Thanks @isbecker, finally had the time to dig into reviewing this one. It looks like in the podman init PR in home-manager, they opted to just hard code some system paths for distros like Ubuntu. I think the diff for this PR seems reasonable and flexible, extending the Appreciate the PR! |
This fixes #106.
See my comment in #106 (comment)
This PR adds the
++ cfg.path
that I mentioned.I have tested this change by setting the path in the
virtualisation.containerd.rootless
config, like so:Since I am running on Ubuntu, I need to add
/usr
to the path (andcontainerd-rootless.nix
useslib.makeBinPath
which add/bin
).The final
containerd-rootless.sh
script's PATH includes/usr/bin
and nowrootlesskit
succesfully findsnewuidmap
on the PATH.If you want to test this change, you can use the fork, something like so:
Finally, testing an image: