Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add credential helpers to Alpine image #230

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions hack/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ ARG TARGETARCH
ARG TARGETVARIANT
ARG BUILDPLATFORM
RUN apk add bash git

# Get GCR credential helper
RUN go install github.com/GoogleCloudPlatform/docker-credential-gcr@latest

# Get Amazon ECR credential helper
RUN go install github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login@latest

# Get ACR docker env credential helper
RUN go install github.com/chrismellard/docker-credential-acr-env@latest

RUN mkdir /manifest-tool
WORKDIR /manifest-tool
COPY . /manifest-tool
Expand All @@ -12,5 +22,8 @@ RUN /manifest-tool/hack/makestatic.sh $TARGETARCH ${TARGETVARIANT#v}
FROM alpine:3.17.0
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/docker-credential-gcr /usr/bin/docker-credential-gcr
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" ]
Loading