diff options
author | Utku Demir <me@utdemir.com> | 2020-08-14 21:06:00 +1200 |
---|---|---|
committer | Utku Demir <me@utdemir.com> | 2020-09-04 16:53:23 +1200 |
commit | ae82f81bfaf8691e49a0de9c01c29c72a411bfb3 (patch) | |
tree | 2a9c93d4fc9ebd7518107f0fed45e7a701aaba0a /pkgs/build-support/docker/examples.nix | |
parent | 0ea35cf25cb42304dfadf9c6ceb590f1d9c3ad8c (diff) | |
download | nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.tar nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.tar.gz nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.tar.bz2 nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.tar.lz nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.tar.xz nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.tar.zst nixpkgs-ae82f81bfaf8691e49a0de9c01c29c72a411bfb3.zip |
dockerTools.streamLayeredImage: Store the customisation layer as a tarball
This fixes as issue described here[1], where permissions set by 'extraCommands' were ignored by Nix. [1] https://github.com/NixOS/nixpkgs/pull/91084#issuecomment-669834938
Diffstat (limited to 'pkgs/build-support/docker/examples.nix')
-rw-r--r-- | pkgs/build-support/docker/examples.nix | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix index bc107471762..4a611add8a1 100644 --- a/pkgs/build-support/docker/examples.nix +++ b/pkgs/build-support/docker/examples.nix @@ -298,21 +298,10 @@ rec { name = "no-store-paths"; tag = "latest"; extraCommands = '' - chmod a+w bin - # This removes sharing of busybox and is not recommended. We do this # to make the example suitable as a test case with working binaries. cp -r ${pkgs.pkgsStatic.busybox}/* . ''; - contents = [ - # This layer has no dependencies and its symlinks will be dereferenced - # when creating the customization layer. - (pkgs.runCommand "layer-to-flatten" {} '' - mkdir -p $out/bin - ln -s /bin/true $out/bin/custom-true - '' - ) - ]; }; nixLayered = pkgs.dockerTools.buildLayeredImageWithNixDb { @@ -415,7 +404,7 @@ rec { pkgs.dockerTools.buildLayeredImage { name = "bash-layered-with-user"; tag = "latest"; - contents = [ pkgs.bash pkgs.coreutils (nonRootShadowSetup { uid = 999; user = "somebody"; }) ]; + contents = [ pkgs.bash pkgs.coreutils ] ++ nonRootShadowSetup { uid = 999; user = "somebody"; }; }; } |