Merge pull request #248735 from considerate/considerate/merge-docker

dockerTools: replace --no-clobber with --update=none

authored by Robert Hensing and committed by GitHub 65d41fb5 06a6acb7

+11 -11
+11 -11
pkgs/build-support/docker/default.nix
··· 5 , closureInfo 6 , coreutils 7 , e2fsprogs 8 - , fakechroot 9 , fakeNss 10 , fakeroot 11 , go ··· 777 fi 778 done 779 # Copy all layers from input images to output image directory 780 - cp -R --no-clobber inputs/*/* image/ 781 # Merge repositories objects and manifests 782 jq -s add "''${repos[@]}" > repositories 783 jq -s add "''${manifests[@]}" > manifest.json ··· 887 }); 888 889 contentsList = if builtins.isList contents then contents else [ contents ]; 890 891 # We store the customisation layer as a tarball, to make sure that 892 # things like permissions set on 'extraCommands' are not overridden ··· 898 nativeBuildInputs = [ 899 fakeroot 900 ] ++ optionals enableFakechroot [ 901 - fakechroot 902 - # for chroot 903 - coreutils 904 - # fakechroot needs getopt, which is provided by util-linux 905 - util-linux 906 ]; 907 postBuild = '' 908 mv $out old_out 909 (cd old_out; eval "$extraCommands" ) 910 911 mkdir $out 912 - ${optionalString enableFakechroot '' 913 - export FAKECHROOT_EXCLUDE_PATH=/dev:/proc:/sys:${builtins.storeDir}:$out/layer.tar 914 - ''} 915 - ${optionalString enableFakechroot ''fakechroot chroot $PWD/old_out ''}fakeroot bash -c ' 916 source $stdenv/setup 917 ${optionalString (!enableFakechroot) ''cd old_out''} 918 eval "$fakeRootCommands"
··· 5 , closureInfo 6 , coreutils 7 , e2fsprogs 8 + , proot 9 , fakeNss 10 , fakeroot 11 , go ··· 777 fi 778 done 779 # Copy all layers from input images to output image directory 780 + cp -R --update=none inputs/*/* image/ 781 # Merge repositories objects and manifests 782 jq -s add "''${repos[@]}" > repositories 783 jq -s add "''${manifests[@]}" > manifest.json ··· 887 }); 888 889 contentsList = if builtins.isList contents then contents else [ contents ]; 890 + bind-paths = builtins.toString (builtins.map (path: "--bind=${path}:${path}!") [ 891 + "/dev/" 892 + "/proc/" 893 + "/sys/" 894 + "${builtins.storeDir}/" 895 + "$out/layer.tar" 896 + ]); 897 898 # We store the customisation layer as a tarball, to make sure that 899 # things like permissions set on 'extraCommands' are not overridden ··· 905 nativeBuildInputs = [ 906 fakeroot 907 ] ++ optionals enableFakechroot [ 908 + proot 909 ]; 910 postBuild = '' 911 mv $out old_out 912 (cd old_out; eval "$extraCommands" ) 913 914 mkdir $out 915 + ${optionalString enableFakechroot ''proot -r $PWD/old_out ${bind-paths} --pwd=/ ''}fakeroot bash -c ' 916 source $stdenv/setup 917 ${optionalString (!enableFakechroot) ''cd old_out''} 918 eval "$fakeRootCommands"