use rsync, comment out pulls
This commit is contained in:
parent
b9007c8d83
commit
940aafcbcc
@ -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 = ''
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user