docker-images: simplify a bit by decompressing at push time
This avoids Nix finding store paths in the output (because they're hidden), and thus adding weird extraneous dependencies to the closure.
This commit is contained in:
parent
7b80b817dd
commit
38b2bb3516
1 changed files with 4 additions and 4 deletions
|
@ -13,12 +13,12 @@ let
|
||||||
"registry.apps.k8s.lukegb.tech/depotcron/update_nixpkgs:latest" = depot.ops.maint.update_nixpkgs;
|
"registry.apps.k8s.lukegb.tech/depotcron/update_nixpkgs:latest" = depot.ops.maint.update_nixpkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
baseName = p: builtins.elemAt (builtins.match "^[a-z0-9]+-([^.]+).*$" (baseNameOf p)) 0;
|
||||||
|
|
||||||
crane = "${depot.nix.pkgs.crane}/bin/crane";
|
crane = "${depot.nix.pkgs.crane}/bin/crane";
|
||||||
decompress = drv: pkgs.runCommandNoCC "docker-image" {} ''
|
|
||||||
${pkgs.gzip}/bin/gunzip -c ${drv} > $out
|
|
||||||
'';
|
|
||||||
pushCommands = lib.mapAttrsToList (name: value: ''
|
pushCommands = lib.mapAttrsToList (name: value: ''
|
||||||
${crane} push ${decompress value} ${name}
|
${pkgs.gzip}/bin/gunzip -c ${value} > /tmp/push.tar
|
||||||
|
${crane} push /tmp/push.tar ${name}
|
||||||
'') images;
|
'') images;
|
||||||
|
|
||||||
authCommands = lib.mapAttrsToList (name: value: ''
|
authCommands = lib.mapAttrsToList (name: value: ''
|
||||||
|
|
Loading…
Reference in a new issue