mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 12:07:47 +03:00
dockerTools: fix export
This commit is contained in:
parent
0319228a45
commit
fa0cc611ff
@ -280,9 +280,13 @@ rec {
|
||||
'');
|
||||
in
|
||||
runCommand name { } ''
|
||||
mkdir -p $out
|
||||
cd ${result}
|
||||
cp layer.tar json VERSION $out
|
||||
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 .
|
||||
'';
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user