Skip to content

Commit

Permalink
publish manifest with buildx imagetools
Browse files Browse the repository at this point in the history
Signed-off-by: Brooks Newberry <[email protected]>
  • Loading branch information
brooksn committed Oct 28, 2024
1 parent e536cc4 commit c233e32
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions scripts/publish-manifest-runtime
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit c233e32

Please sign in to comment.