Skip to content

Commit

Permalink
Merge pull request #132 from szucsitg/multiple-params
Browse files Browse the repository at this point in the history
fix: multiple shell args
  • Loading branch information
nlewo authored Apr 13, 2024
2 parents 2154ad0 + 8c549e8 commit 20aad30
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 20aad30

Please sign in to comment.