-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
nixos/docker-containers: Rename to virtualisation.oci-containers.containers #85933
nixos/docker-containers: Rename to virtualisation.oci-containers.containers #85933
Conversation
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.
Nice! LGTM
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.
This is nice 🎉
LGTM 🐯
f568f44
to
31a954c
Compare
@GrahamcOfBorg test docker-containers |
Maybe this should be renamed |
I would rather not switch the name to |
How about OCI containers? |
31a954c
to
9a07505
Compare
SGTM! I've renamed |
9a07505
to
8b350d6
Compare
Now that’s what I call drop-in. |
For cgroupsv2 we have to wait for a new runc release or switch to crun. |
As a NixOS user I'm super -1 on this. It's OK to add another module but removing docker-containers is going to suck for users like me who don't want to use podman (and the rest of that ecosystem). What's wrong with adding this as a separate module and leave the docker modules exist? I'm -1 on the name as well. Podman is not the only OCI compliant tool out there. It seems disingenuous to imply that. |
We should fix outstanding issues with podman before merging this. this one is pretty serious for example: #77925 |
I also agree with @denibertovic that naming it OCI is not fair. How about just naming it Having it have a different distinct name; but still be drop-in is valuable and gaves the same benefits without stepping on toes of existing docker users. Disabling the docker module conditionally when We could at a later stage maybe drop support for docker but I think it's still very early for that. -1 for changing the module name +1 for keeping both modules and documenting (through an assertion) that the one is a drop-in replacement for the other. parameterized NixOS VM tests can make sure the two are in sync |
Do you have any actual arguments for not using Podman & associated tooling or is this just FUD?
Fragmentation and the fact that running Docker containers inside systemd units has surprising limitations like being unable to constrain a unit in various ways like I'm strongly against duplicating the current module under a new What we could do quite easily is to provide a parameter which docker runtime you'd like to use, then anyone actually wanting to use the Docker daemon for whatever reason could do so.
I completely agree. |
@adisbladis What kind of a response is that? Why would you imply malice straight away??!
Not being able to use I don't need those features for instance. I'm sure there are many users that use various tech in different ways than you and I. That should be encouraged and they should be able to choose that.
I don't have any particular opinion on how the implementation should go. I'm sure there are various abstractions that could be used to make this not be I don't think there should be a default though. It should be clear to the user what it is they're "activating". It would be very wrong, as someone pointed out above, if the user ran a container and then did "docker ps" and got zilch. |
My company uses docker and I want to be isofunctional with her for the dev. |
Luckily nix is a language and we can abstract these things no? I really would like to avoid breaking compatibility for the sake of breaking it. If this PR is merged I would imagine something like this: Oci-container module has indeed some kind of backend parameter that's either podman, docker or others. There is a mkRenameModuleOption or equivalent that translates the old
edit: I see you already had a rename in place, however it would be nice to have a . |
Concretely: I would suggest adding this to the module:
(lib.mkChangedOptionModule
[ "docker-containers" ]
[ "virtualisation" "oci-containers" ]
(oldcfg: lib.mkMerge [
oldcfg
{backend = "docker";}
]))
This seems to both make @adisbladis happy as we dont have to maintain two modules and @denibertovic happy as they can keep using docker and get a hint on how to migrate. |
737b737
to
b98c691
Compare
According to the suggestion by @arianvp I've gone ahead and change the purpose of this PR. It's still my intent to do so but for now we're mainly changing the module name and making the backend configurable. |
b98c691
to
141cb72
Compare
e72380c
to
3e68fed
Compare
@GrahamcOfBorg test oci-containers |
Looks good to me now |
I just wrote up an issue about some issues with podman's overall packaging: #86245 |
Unless I hear objections I plan to merge this PR within the next couple of days. Note that the PR scope has changed, this is now only a module rename + it makes the backend configurable. |
…ainers. And allow the runtime to be configurable via the `virtualisation.oci-containers.backend` option. Valid choices are "podman" and "docker".
3e68fed
to
2f77475
Compare
Apart from all the things this makes better, it also introduces an interesting side-effect. Every time any part of the system path changes, cc @ajs124 Tracked internally as |
Motivation for this change
Using the
docker
daemon for thedocker-containers
never fit entirely in the NixOS model.This PR implements a minimal set of changes to change the runtime. Any module improvements (like rootless declarative containers) we can make with
podman
should be left for a follow-up.The potential downside is that users may be confused by the change when they run
docker ps
and the container is not showing up.Discussion
After the discussion in this PR I have decided to change the scope of the PR: to only make the backend for this module configurable while not changing the default quite yet.
Both backends (
docker
&podman
) have NixOS tests.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)