Created
September 20, 2019 12:10
-
-
Save ndeloof/3bea837c30942fc7c3f930dca5d1a2e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Compatibility check for registry to support multi-architecutre docker images | |
# (also required for docker app support) | |
# | |
# Usage: | |
# docker login <REGISTRY> | |
# ... | |
# ./multiarch.sh <REGISTRY> | |
# | |
set -x | |
set -e | |
REGISTRY=$1 | |
# Pull busybox archtecture specific images used within this script | |
docker pull busybox@sha256:dd97a3fe6d721c5cf03abac0f50e2848dc583f7c4e41bf39102ceb42edfd1808 | |
docker pull busybox@sha256:b6e25123419cbaa5f07cf8e1a8b2e813cc6e7939b6c0d38161c7cfa435dbdc8d | |
# Tag images for target registry and push | |
docker tag busybox@sha256:b6e25123419cbaa5f07cf8e1a8b2e813cc6e7939b6c0d38161c7cfa435dbdc8d $REGISTRY/busybox:arm8 | |
docker tag busybox@sha256:dd97a3fe6d721c5cf03abac0f50e2848dc583f7c4e41bf39102ceb42edfd1808 $REGISTRY/busybox:amd64 | |
docker push $REGISTRY/busybox:arm8 | |
docker push $REGISTRY/busybox:amd64 | |
# manifest CLI command is experimental | |
export DOCKER_CLI_EXPERIMENTAL=enabled | |
# Create multi-arch manifest | |
docker manifest create $REGISTRY/busybox $REGISTRY/busybox:amd64 $REGISTRY/busybox:arm8 | |
# Push multi-arch manifest | |
docker manifest push $REGISTRY/busybox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment