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 extra packages in docker image #12120

Open
2 tasks done
jceb opened this issue Dec 31, 2024 · 0 comments
Open
2 tasks done

Support extra packages in docker image #12120

jceb opened this issue Dec 31, 2024 · 0 comments
Labels
feature Feature request or proposal

Comments

@jceb
Copy link

jceb commented Dec 31, 2024

Is your feature request related to a problem?

I would like to build upon the docker.nix configuration provided in this repository directly from, instead of creating a Dockerfile. This worked well - I imported this repository as input and then imported and customized docker.nix with the supported variables.

However, I found that the extraPkgs parameter installs packages only in the root user's profile directory - /root/.nix-profile. This doesn't work for me, because I need to place a configuration file in /etc.

Proposed solution

I propose to add an additional parameter, e.g. extraBasePkgs that is appended to the contents parameter of pkgs.dockerTools.buildLayeredImageWithNixDb.

Alternative solutions

I tried to use .overrideAttrs on the output of pkgs.dockerTools.buildLayeredImageWithNixDb but failed. This might be an alternative.

Checklist


Add 👍 to issues you find important.

@jceb jceb added the feature Feature request or proposal label Dec 31, 2024
jceb added a commit to jceb/nix that referenced this issue Dec 31, 2024
jceb added a commit to jceb/nix that referenced this issue Dec 31, 2024
jceb added a commit to jceb/nix that referenced this issue Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

1 participant