diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-05-25 14:29:54 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2020-05-25 14:29:54 +1000 |
commit | 365d07cea0446cbdc3d2c89502ce62c1f283989b (patch) | |
tree | f0bfe4a3dd5d67724db471788adfc825d0e2efff /pkgs/build-support/docker | |
parent | 7a2307dc4b9a4ccbfd5f29b30a572297a47f63e8 (diff) |
dockerTools: fix skopeo commands
Diffstat (limited to 'pkgs/build-support/docker')
-rwxr-xr-x | pkgs/build-support/docker/nix-prefetch-docker | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/build-support/docker/nix-prefetch-docker b/pkgs/build-support/docker/nix-prefetch-docker index bf01384ccdb4..1b6785189c28 100755 --- a/pkgs/build-support/docker/nix-prefetch-docker +++ b/pkgs/build-support/docker/nix-prefetch-docker @@ -12,7 +12,6 @@ finalImageTag= hashType=$NIX_HASH_ALGO hashFormat=$hashFormat format=nix -skopeoCmd="skopeo --insecure-policy --tmpdir=$TMPDIR" usage(){ echo >&2 "syntax: nix-prefetch-docker [options] [IMAGE_NAME [IMAGE_TAG|IMAGE_DIGEST]] @@ -39,7 +38,7 @@ get_image_digest(){ imageTag="latest" fi - "$skopeoCmd" inspect "docker://$imageName:$imageTag" | jq '.Digest' -r + skopeo --insecure-policy --tmpdir=$TMPDIR inspect "docker://$imageName:$imageTag" | jq '.Digest' -r } get_name() { @@ -128,9 +127,9 @@ trap "rm -rf \"$tmpPath\"" EXIT tmpFile="$tmpPath/$(get_name $finalImageName $finalImageTag)" if test -z "$QUIET"; then - "$skopeoCmd" --override-os ${os} --override-arch ${arch} copy "$sourceUrl" "docker-archive://$tmpFile:$finalImageName:$finalImageTag" + skopeo --insecure-policy --tmpdir=$TMPDIR --override-os ${os} --override-arch ${arch} copy "$sourceUrl" "docker-archive://$tmpFile:$finalImageName:$finalImageTag" else - "$skopeoCmd" --override-os ${os} --override-arch ${arch} copy "$sourceUrl" "docker-archive://$tmpFile:$finalImageName:$finalImageTag" > /dev/null + skopeo --insecure-policy --tmpdir=$TMPDIR --override-os ${os} --override-arch ${arch} copy "$sourceUrl" "docker-archive://$tmpFile:$finalImageName:$finalImageTag" > /dev/null fi # Compute the hash. |