mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
dockerTools.runWithOverlay: Avoid cluttering $out and copying
This commit is contained in:
parent
8863a5199d
commit
63bf4539b9
@ -191,13 +191,13 @@ rec {
|
|||||||
, postMount ? ""
|
, postMount ? ""
|
||||||
, postUmount ? ""
|
, postUmount ? ""
|
||||||
}:
|
}:
|
||||||
let
|
vmTools.runInLinuxVM (
|
||||||
result = vmTools.runInLinuxVM (
|
|
||||||
runCommand name
|
runCommand name
|
||||||
{
|
{
|
||||||
preVM = vmTools.createEmptyImage {
|
preVM = vmTools.createEmptyImage {
|
||||||
size = diskSize;
|
size = diskSize;
|
||||||
fullName = "docker-run-disk";
|
fullName = "docker-run-disk";
|
||||||
|
destination = "./image";
|
||||||
};
|
};
|
||||||
inherit fromImage fromImageName fromImageTag;
|
inherit fromImage fromImageName fromImageTag;
|
||||||
|
|
||||||
@ -278,16 +278,6 @@ rec {
|
|||||||
|
|
||||||
${postUmount}
|
${postUmount}
|
||||||
'');
|
'');
|
||||||
in
|
|
||||||
runCommand name { } ''
|
|
||||||
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 }:
|
exportImage = { name ? fromImage.name, fromImage, fromImageName ? null, fromImageTag ? null, diskSize ? 1024 }:
|
||||||
runWithOverlay {
|
runWithOverlay {
|
||||||
|
Loading…
Reference in New Issue
Block a user