-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: add parameter extraBasePkgs #12120 #12121
base: master
Are you sure you want to change the base?
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.
See comment, and needs tests and documentation.
docker.nix
Outdated
@@ -287,7 +288,7 @@ pkgs.dockerTools.buildLayeredImageWithNixDb { | |||
|
|||
inherit name tag maxLayers uid gid uname gname; | |||
|
|||
contents = [ baseSystem ]; | |||
contents = [ baseSystem ] ++ extraBasePkgs;; |
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.
iirc passing more than one element turns the whole root file system into a symlink farm.
I doubt that this is correct or intended.
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.
Could you elaborate on what this will change will cause? In my understanding, this is the intended way of how nix docker image building works.
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.
Only partly. We also need things in the root file system that aren't symlinks, such as /tmp
and /var
which are created as part of baseSystem
.
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.
Yes, I understand. So how are additional packages interfering with this? Isn't this what's happening on NixOS every time I install a package?
I'm still trying to understand whether this PR makes sense or not. At the moment, I have trouble reconciling what you're saying with how I've been using nix dockerTools and my everyday NixOS.
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.
NixOS doesn't have a contents
that fills the root file system. It sets up various parts of the root file system on installation, on boot, and on activation.
dockerTools is fairly low level and doesn't do many of the things NixOS does.
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.
Thank you for your feedback. Is there anything else that needs to be addressed to resolve this thread?
I don't think we have any tests for |
Motivation
Adds support for additional base packages in the docker image.
Context
Solves #12120
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.