Skip to content

Support extra packages in docker image #12120

Open
@jceb

Description

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.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions