git.iko.soy/typeable/nixpkgs
on master help sign in
use rsync, comment out pulls
commit940aafcbcc849a0a90219299626672085a9fe18b authorAllen Nelson <anelson@narrativescience.com> dateMon 3 Oct 2016, 15:12 (10 years ago) parentb9007c8
2 files changed+15−12
pkgs/build-support/docker/default.nix+5−6 pkgs/build-support/docker/examples.nix+10−6
pkgs/build-support/docker/default.nix+5−6
@@ -10,6 +10,7 @@
1010 pkgs,
1111 pigz,
1212 runCommand,
13+ rsync,
1314 shadow,
1415 stdenv,
1516 storeDir ? builtins.storeDir,
@@ -120,7 +121,7 @@ rec {
120121 };
121122 inherit fromImage fromImageName fromImageTag;
122123
123− buildInputs = [ utillinux e2fsprogs jshon ];
124+ buildInputs = [ utillinux e2fsprogs jshon rsync ];
124125 } ''
125126 rm -rf $out
126127
@@ -238,7 +239,7 @@ rec {
238239 runCommand "docker-layer-${name}" {
239240 inherit baseJson contents extraCommands;
240241
241− buildInputs = [ jshon ];
242+ buildInputs = [ jshon rsync ];
242243 }
243244 ''
244245 mkdir layer
@@ -246,9 +247,8 @@ rec {
246247 echo "Adding contents..."
247248 for item in $contents; do
248249 echo "Adding $item"
249− cp -drf $item/* layer/
250+ rsync -a $item/ layer/
250251 done
251− chmod -R ug+w layer/
252252 else
253253 echo "No contents to add to layer."
254254 fi
@@ -310,9 +310,8 @@ rec {
310310 echo "Adding contents..."
311311 for item in ${toString contents}; do
312312 echo "Adding $item..."
313− cp -drf $item/* layer/
313+ rsync -a $item/ layer/
314314 done
315− chmod -R ug+w layer/
316315 '';
317316
318317 postMount = ''
pkgs/build-support/docker/examples.nix+10−6
@@ -83,12 +83,16 @@ rec {
8383 };
8484
8585 # 4. example of pulling an image. could be used as a base for other images
86− debian = pullImage {
87− imageName = "debian";
88− imageTag = "jessie";
89− # this hash will need change if the tag is updated at docker hub
90− sha256 = "18kd495lc2k35h03bpcbdjnix17nlqbwf6nmq3sb161blf0dk14q";
91− };
86+ #
87+ # ***** Currently broken, getting 404s. Perhaps the docker API has changed?
88+ #
89+ #
90+ # debian = pullImage {
91+ # imageName = "debian";
92+ # imageTag = "jessie";
93+ # # this hash will need change if the tag is updated at docker hub
94+ # sha256 = "18kd495lc2k35h03bpcbdjnix17nlqbwf6nmq3sb161blf0dk14q";
95+ # };
9296
9397 # 5. example of multiple contents, emacs and vi happily coexisting
9498 editors = buildImage {