diff --git a/hack/Dockerfile.alpine b/hack/Dockerfile.alpine index 44f74096..018bce27 100644 --- a/hack/Dockerfile.alpine +++ b/hack/Dockerfile.alpine @@ -3,6 +3,7 @@ ARG TARGETPLATFORM ARG TARGETARCH ARG TARGETVARIANT ARG BUILDPLATFORM +ARG BUILDARCH RUN apk add bash git ENV GOOS linux @@ -17,17 +18,18 @@ RUN GOARM=${GOARMV#v} go install github.com/awslabs/amazon-ecr-credential-helper # Get ACR docker env credential helper RUN GOARM=${GOARMV#v} go install github.com/chrismellard/docker-credential-acr-env@latest +RUN if [ ! "${BUILDARCH}" = "${TARGETARCH}" ]; then mv /go/bin/linux_${TARGETARCH}/* /go/bin; fi + RUN mkdir /manifest-tool WORKDIR /manifest-tool COPY . /manifest-tool RUN /manifest-tool/hack/makestatic.sh $TARGETARCH ${TARGETVARIANT#v} FROM --platform=$TARGETPLATFORM alpine:3.17.0 -ARG TARGETARCH COPY --from=bld /manifest-tool/manifest-tool /manifest-tool COPY --from=bld /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=bld --chown=0:0 /go/bin/linux_${TARGETARCH}/docker-credential-gcr /usr/bin/docker-credential-gcloud -COPY --from=bld --chown=0:0 /go/bin/linux_${TARGETARCH}/docker-credential-ecr-login /usr/bin/docker-credential-ecr-login -COPY --from=bld --chown=0:0 /go/bin/linux_${TARGETARCH}/docker-credential-acr-env /usr/bin/docker-credential-acr-env +COPY --from=bld --chown=0:0 /go/bin/docker-credential-gcr /usr/bin/docker-credential-gcloud +COPY --from=bld --chown=0:0 /go/bin/docker-credential-ecr-login /usr/bin/docker-credential-ecr-login +COPY --from=bld --chown=0:0 /go/bin/docker-credential-acr-env /usr/bin/docker-credential-acr-env ENV PATH="${PATH}:/" ENTRYPOINT [ "/manifest-tool" ] diff --git a/v2/cmd/manifest-tool/main.go b/v2/cmd/manifest-tool/main.go index 35a8c8aa..17563428 100644 --- a/v2/cmd/manifest-tool/main.go +++ b/v2/cmd/manifest-tool/main.go @@ -14,7 +14,7 @@ import ( var gitCommit = "" const ( - version = "2.1.1" + version = "2.1.2" usage = "registry client to inspect and push multi-platform OCI & Docker v2 images" )