Skip to content

Commit

Permalink
containers: try fixing skopeo command
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Mar 25, 2024
1 parent 06a7f0f commit 47569d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ let

# <registry> <args>
mkCopyScript = cfg: pkgs.writeShellScript "copy-container" ''
set -e -o pipefail
container=$1
shift
Expand All @@ -163,7 +165,7 @@ let
dest="''${registry}${cfg.name}:${cfg.version}"
if [[ $# == 0 ]]; then
args=(${toString cfg.defaultCopyArgs})
args=(${if cfg.defaultCopyArgs == [] then "" else toString cfg.defaultCopyArgs})
else
args=("$@")
fi
Expand All @@ -172,7 +174,7 @@ let
echo "Copying container $container to $dest"
echo
${nix2container.skopeo-nix2container}/bin/skopeo --insecure-policy copy "nix:$container" "$dest" "''${args[@]}"
${nix2container.skopeo-nix2container}/bin/skopeo --insecure-policy copy "nix:$container" "$dest" ''${args[@]}
'';
containerOptions = types.submodule ({ name, config, ... }: {
options = {
Expand Down

0 comments on commit 47569d9

Please sign in to comment.