mirror of
https://github.com/hercules-ci/arion.git
synced 2024-11-26 21:27:28 +03:00
Use streamLayeredImage for base image
This commit is contained in:
parent
b83cf51efd
commit
ad41d1e39b
@ -6,11 +6,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
tag = lib.head (lib.strings.splitString "-" (baseNameOf builtImage.outPath));
|
|
||||||
name = "arion-base";
|
name = "arion-base";
|
||||||
|
|
||||||
builtImage = pkgs.dockerTools.buildImage {
|
imageExe = pkgs.dockerTools.streamLayeredImage {
|
||||||
inherit name;
|
inherit name;
|
||||||
contents = pkgs.runCommand "minimal-contents" {} ''
|
contents = pkgs.runCommand "minimal-contents" {} ''
|
||||||
mkdir -p $out/bin $out/usr/bin
|
mkdir -p $out/bin $out/usr/bin
|
||||||
@ -19,6 +17,7 @@ let
|
|||||||
'';
|
'';
|
||||||
config = {};
|
config = {};
|
||||||
};
|
};
|
||||||
|
inherit (imageExe) imageTag;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -33,9 +32,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
arionBaseImage = "${name}:${tag}";
|
arionBaseImage = "${name}:${imageTag}";
|
||||||
build.imagesToLoad = lib.mkIf (lib.any (s: s.service.useHostStore) (lib.attrValues config.services)) [
|
build.imagesToLoad = lib.mkIf (lib.any (s: s.service.useHostStore) (lib.attrValues config.services)) [
|
||||||
{ image = builtImage; imageName = name; imageTag = tag; }
|
{ imageExe = imageExe; imageName = name; inherit imageTag; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user