Loading doc/build-helpers/images/dockertools.section.md +8 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,10 @@ Similarly, if you encounter errors similar to `Error_Protocol ("certificate has _Default value:_ `false`. `meta` (Attribute Set) : The `meta` attribute of the resulting derivation, as in `stdenv.mkDerivation`. Accepts `description`, `maintainers` and any other `meta` attributes. `contents` **DEPRECATED** : This attribute is deprecated, and users are encouraged to use `copyToRoot` instead. Loading Loading @@ -635,6 +639,10 @@ This allows the function to produce reproducible images. _Default value:_ `false`. `meta` (Attribute Set) : The `meta` attribute of the resulting derivation, as in `stdenv.mkDerivation`. Accepts `description`, `maintainers` and any other `meta` attributes. `passthru` (Attribute Set; _optional_) : Use this to pass any attributes as [`passthru`](#chap-passthru) for the resulting derivation. Loading pkgs/build-support/docker/default.nix +13 −1 Original line number Diff line number Diff line Loading @@ -579,10 +579,16 @@ rec { { name, compressor ? "gz", meta ? { }, ... }@args: let stream = streamLayeredImage (removeAttrs args [ "compressor" ]); stream = streamLayeredImage ( removeAttrs args [ "compressor" "meta" ] ); compress = compressorForImage compressor name; in runCommand "${baseNameOf name}.tar${compress.ext}" { Loading @@ -592,6 +598,7 @@ rec { inherit stream; }; nativeBuildInputs = compress.nativeInputs; inherit meta; } "${stream} | ${compress.compress} > $out" ); Loading Loading @@ -641,6 +648,8 @@ rec { includeNixDB ? false, # Deprecated. contents ? null, # Meta options to set on the resulting derivation. meta ? { }, }: let Loading Loading @@ -735,6 +744,7 @@ rec { lib.head ( lib.strings.splitString "-" (baseNameOf (builtins.unsafeDiscardStringContext result.outPath)) ); inherit meta; } '' ${lib.optionalString (tag == null) '' Loading Loading @@ -1008,6 +1018,7 @@ rec { includeStorePaths ? true, includeNixDB ? false, passthru ? { }, meta ? { }, # Pipeline used to produce docker layers. If not set, popularity contest # algorithm is used. If set, maxLayers is ignored as the author of the # pipeline can use one of the available functions (like "limit_layers") Loading Loading @@ -1233,6 +1244,7 @@ rec { isExe = true; }; nativeBuildInputs = [ makeWrapper ]; inherit meta; } '' makeWrapper $streamScript $out --add-flags $conf Loading pkgs/build-support/docker/examples.nix +8 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ let "${nginxPort}/tcp" = { }; }; }; meta.description = "Basic nginx docker image example"; }; in Loading @@ -91,6 +93,8 @@ rec { paths = [ pkgs.bashInteractive ]; pathsToLink = [ "/bin" ]; }; meta.description = "Basic example image"; }; # 2. service example, layered on another image Loading Loading @@ -138,6 +142,8 @@ rec { Retries = 3; }; }; meta.description = "Service example, layered on another image"; }; # 3. another service example Loading Loading @@ -204,6 +210,8 @@ rec { "USER=nobody" ]; }; meta.description = "nix example to play with the container nix store"; }; # 7. example of adding something on top of an image pull by our Loading Loading
doc/build-helpers/images/dockertools.section.md +8 −0 Original line number Diff line number Diff line Loading @@ -202,6 +202,10 @@ Similarly, if you encounter errors similar to `Error_Protocol ("certificate has _Default value:_ `false`. `meta` (Attribute Set) : The `meta` attribute of the resulting derivation, as in `stdenv.mkDerivation`. Accepts `description`, `maintainers` and any other `meta` attributes. `contents` **DEPRECATED** : This attribute is deprecated, and users are encouraged to use `copyToRoot` instead. Loading Loading @@ -635,6 +639,10 @@ This allows the function to produce reproducible images. _Default value:_ `false`. `meta` (Attribute Set) : The `meta` attribute of the resulting derivation, as in `stdenv.mkDerivation`. Accepts `description`, `maintainers` and any other `meta` attributes. `passthru` (Attribute Set; _optional_) : Use this to pass any attributes as [`passthru`](#chap-passthru) for the resulting derivation. Loading
pkgs/build-support/docker/default.nix +13 −1 Original line number Diff line number Diff line Loading @@ -579,10 +579,16 @@ rec { { name, compressor ? "gz", meta ? { }, ... }@args: let stream = streamLayeredImage (removeAttrs args [ "compressor" ]); stream = streamLayeredImage ( removeAttrs args [ "compressor" "meta" ] ); compress = compressorForImage compressor name; in runCommand "${baseNameOf name}.tar${compress.ext}" { Loading @@ -592,6 +598,7 @@ rec { inherit stream; }; nativeBuildInputs = compress.nativeInputs; inherit meta; } "${stream} | ${compress.compress} > $out" ); Loading Loading @@ -641,6 +648,8 @@ rec { includeNixDB ? false, # Deprecated. contents ? null, # Meta options to set on the resulting derivation. meta ? { }, }: let Loading Loading @@ -735,6 +744,7 @@ rec { lib.head ( lib.strings.splitString "-" (baseNameOf (builtins.unsafeDiscardStringContext result.outPath)) ); inherit meta; } '' ${lib.optionalString (tag == null) '' Loading Loading @@ -1008,6 +1018,7 @@ rec { includeStorePaths ? true, includeNixDB ? false, passthru ? { }, meta ? { }, # Pipeline used to produce docker layers. If not set, popularity contest # algorithm is used. If set, maxLayers is ignored as the author of the # pipeline can use one of the available functions (like "limit_layers") Loading Loading @@ -1233,6 +1244,7 @@ rec { isExe = true; }; nativeBuildInputs = [ makeWrapper ]; inherit meta; } '' makeWrapper $streamScript $out --add-flags $conf Loading
pkgs/build-support/docker/examples.nix +8 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ let "${nginxPort}/tcp" = { }; }; }; meta.description = "Basic nginx docker image example"; }; in Loading @@ -91,6 +93,8 @@ rec { paths = [ pkgs.bashInteractive ]; pathsToLink = [ "/bin" ]; }; meta.description = "Basic example image"; }; # 2. service example, layered on another image Loading Loading @@ -138,6 +142,8 @@ rec { Retries = 3; }; }; meta.description = "Service example, layered on another image"; }; # 3. another service example Loading Loading @@ -204,6 +210,8 @@ rec { "USER=nobody" ]; }; meta.description = "nix example to play with the container nix store"; }; # 7. example of adding something on top of an image pull by our Loading