diff options
author | Allen Nelson <anelson@narrativescience.com> | 2016-10-03 15:12:29 -0500 |
---|---|---|
committer | Allen Nelson <anelson@narrativescience.com> | 2016-10-03 15:12:29 -0500 |
commit | 940aafcbcc849a0a90219299626672085a9fe18b (patch) | |
tree | 886079cbe4b60e4271b7d76ac25ca9787c3b9992 /pkgs/build-support | |
parent | b9007c8d83f91e7e8614559af292de4950c616c1 (diff) | |
download | nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.tar nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.tar.gz nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.tar.bz2 nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.tar.lz nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.tar.xz nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.tar.zst nixpkgs-940aafcbcc849a0a90219299626672085a9fe18b.zip |
use rsync, comment out pulls
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/docker/default.nix | 11 | ||||
-rw-r--r-- | pkgs/build-support/docker/examples.nix | 16 |
2 files changed, 15 insertions, 12 deletions
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 578025c1113..b3db68a665d 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -10,6 +10,7 @@ pkgs, pigz, runCommand, + rsync, shadow, stdenv, storeDir ? builtins.storeDir, @@ -120,7 +121,7 @@ rec { }; inherit fromImage fromImageName fromImageTag; - buildInputs = [ utillinux e2fsprogs jshon ]; + buildInputs = [ utillinux e2fsprogs jshon rsync ]; } '' rm -rf $out @@ -238,7 +239,7 @@ rec { runCommand "docker-layer-${name}" { inherit baseJson contents extraCommands; - buildInputs = [ jshon ]; + buildInputs = [ jshon rsync ]; } '' mkdir layer @@ -246,9 +247,8 @@ rec { echo "Adding contents..." for item in $contents; do echo "Adding $item" - cp -drf $item/* layer/ + rsync -a $item/ layer/ done - chmod -R ug+w layer/ else echo "No contents to add to layer." fi @@ -310,9 +310,8 @@ rec { echo "Adding contents..." for item in ${toString contents}; do echo "Adding $item..." - cp -drf $item/* layer/ + rsync -a $item/ layer/ done - chmod -R ug+w layer/ ''; postMount = '' diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix index cce8f53834e..05b4a9b4f2d 100644 --- a/pkgs/build-support/docker/examples.nix +++ b/pkgs/build-support/docker/examples.nix @@ -83,12 +83,16 @@ rec { }; # 4. example of pulling an image. could be used as a base for other images - debian = pullImage { - imageName = "debian"; - imageTag = "jessie"; - # this hash will need change if the tag is updated at docker hub - sha256 = "18kd495lc2k35h03bpcbdjnix17nlqbwf6nmq3sb161blf0dk14q"; - }; + # + # ***** Currently broken, getting 404s. Perhaps the docker API has changed? + # + # + # debian = pullImage { + # imageName = "debian"; + # imageTag = "jessie"; + # # this hash will need change if the tag is updated at docker hub + # sha256 = "18kd495lc2k35h03bpcbdjnix17nlqbwf6nmq3sb161blf0dk14q"; + # }; # 5. example of multiple contents, emacs and vi happily coexisting editors = buildImage { |