Skip to content

Commit

Permalink
Merge pull request #239 from estesp/fix-image-gen-again
Browse files Browse the repository at this point in the history
Fix Alpine+credential helpers image generation (again)
  • Loading branch information
estesp authored Nov 2, 2023
2 parents 56b94e8 + 9e05969 commit dccc1e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions hack/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
ARG BUILDPLATFORM
ARG BUILDARCH
RUN apk add bash git

ENV GOOS linux
Expand All @@ -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" ]
2 changes: 1 addition & 1 deletion v2/cmd/manifest-tool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down

0 comments on commit dccc1e8

Please sign in to comment.