dockerTools: fix export

This commit is contained in:
Justin Bedo 2020-02-14 09:27:07 +11:00
parent 0319228a45
commit fa0cc611ff
No known key found for this signature in database
GPG Key ID: 2C18202C56C182BD

View File

@ -280,9 +280,13 @@ rec {
'');
in
runCommand name { } ''
mkdir -p $out
cd ${result}
if [ -e json ] && [ -e VERSION ] ; then
mkdir -p $out
cp layer.tar json VERSION $out
else
cp layer.tar $out
fi
'';
exportImage = { name ? fromImage.name, fromImage, fromImageName ? null, fromImageTag ? null, diskSize ? 1024 }:
@ -291,7 +295,7 @@ rec {
postMount = ''
echo "Packing raw image..."
tar -C mnt --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cf $out .
tar -C mnt --hard-dereference --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cf $out/layer.tar .
'';
};