Merge pull request #6749 from centromere/docker-extra-pkgs-layers

Allow specification of extra packages, maxLayers in Docker image
This commit is contained in:
Rok Garbas 2022-07-05 12:42:49 +02:00 committed by GitHub
commit 8a3d34e974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,8 @@
, tag ? "latest"
, channelName ? "nixpkgs"
, channelURL ? "https://nixos.org/channels/nixpkgs-unstable"
, extraPkgs ? []
, maxLayers ? 100
}:
let
defaultPkgs = with pkgs; [
@ -23,7 +25,7 @@ let
iana-etc
git
openssh
];
] ++ extraPkgs;
users = {
@ -229,7 +231,7 @@ let
in
pkgs.dockerTools.buildLayeredImageWithNixDb {
inherit name tag;
inherit name tag maxLayers;
contents = [ baseSystem ];