docker-nixpkgs/push-all
zimbatm e97a236529
update DockerHub info
create a script that automatically updates the DockerHub project pages
2019-02-13 19:18:57 +01:00

20 lines
531 B
Bash
Executable file

#!/usr/bin/env bash
#
# Usage: ./push-all <registry> <image-prefix> <image-tag>
set -euo pipefail
registry=${1:-docker.io}
image_prefix=${2:-nixpkgs}
image_tag=${3:-latest}
releases_json=$(nix-instantiate ./release.nix --strict --eval --json)
echo "=== Pushing images to $registry"
for attr in $(echo "$releases_json" | jq -r "keys[]") ; do
file=$(echo "$releases_json" | jq -r ".\"$attr\"")
echo "--- $attr -> $file"
skopeo copy "docker-archive://$file" "docker://$registry/$image_prefix/$attr:$image_tag"
done
echo OK