From 1a05941d3975fa8579bd16ea867cb18247eb798e Mon Sep 17 00:00:00 2001 From: Brooks Newberry Date: Mon, 28 Oct 2024 07:01:29 -0700 Subject: [PATCH] publish manifest with buildx imagetools Signed-off-by: Brooks Newberry --- scripts/publish-manifest-runtime | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/publish-manifest-runtime b/scripts/publish-manifest-runtime index 3cc3068d39..9381111373 100755 --- a/scripts/publish-manifest-runtime +++ b/scripts/publish-manifest-runtime @@ -6,21 +6,15 @@ cd $(dirname $0)/.. source ./scripts/version.sh export DOCKER_CLI_EXPERIMENTAL=enabled -docker manifest create \ - ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} \ - ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-amd64 \ - ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-arm64 \ - ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-windows-amd64 - -docker manifest annotate ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-amd64 --os linux --arch amd64 -docker manifest annotate ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-arm64 --os linux --arch arm64 -docker manifest annotate ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-windows-amd64 --os windows --arch amd64 - set +x docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD set -x -docker manifest push ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} +docker buildx imagetools create \ + --tag ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} \ + ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-amd64 \ + ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-linux-arm64 \ + ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION}-windows-amd64 if [ -n "${IID_FILE}" ]; then docker buildx imagetools inspect --format "{{json .Manifest}}" ${REPO}/${PROG}-runtime:${DOCKERIZED_VERSION} | jq -r '.digest' > ${IID_FILE}