mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat: interface and lib refactoring
This commit is contained in:
parent
e260ad9bb4
commit
5d8b66f8a0
10 changed files with 111 additions and 88 deletions
15
lib/docker.nix
Normal file
15
lib/docker.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, pkgs }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
copyDockerImages = { images, dest, args ? "" }:
|
||||
pkgs.writeScriptBin "copy-docker-images" (concatMapStrings (image: ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "copying ${image.imageName}:${image.imageTag}"
|
||||
${pkgs.skopeo}/bin/skopeo copy ${args} $@ docker-archive:${image} ${dest}/${image.imageName}:${image.imageTag}
|
||||
'') images);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue