Skip to content

Commit

Permalink
fix: multiple shell args
Browse files Browse the repository at this point in the history
  • Loading branch information
szucsitg committed Apr 12, 2024
1 parent 2154ad0 commit 8c549e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,22 @@ let
writeSkopeoApplication = name: text: pkgs.writeShellApplication {
inherit name text;
runtimeInputs = [ pkgs.jq skopeo-nix2container ];
excludeShellChecks = [ "SC2068" ];
};

copyToDockerDaemon = image: writeSkopeoApplication "copy-to-docker-daemon" ''
echo "Copy to Docker daemon image ${image.imageName}:${image.imageTag}"
skopeo --insecure-policy copy nix:${image} docker-daemon:${image.imageName}:${image.imageTag} "$@"
skopeo --insecure-policy copy nix:${image} docker-daemon:${image.imageName}:${image.imageTag} $@
'';

copyToRegistry = image: writeSkopeoApplication "copy-to-registry" ''
echo "Copy to Docker registry image ${image.imageName}:${image.imageTag}"
skopeo --insecure-policy copy nix:${image} docker://${image.imageName}:${image.imageTag} "$@"
skopeo --insecure-policy copy nix:${image} docker://${image.imageName}:${image.imageTag} $@
'';

copyTo = image: writeSkopeoApplication "copy-to" ''
echo Running skopeo --insecure-policy copy nix:${image} "$@"
skopeo --insecure-policy copy nix:${image} "$@"
echo Running skopeo --insecure-policy copy nix:${image} $@
skopeo --insecure-policy copy nix:${image} $@
'';

copyToPodman = image: writeSkopeoApplication "copy-to-podman" ''
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c549e8

Please sign in to comment.