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

Fix Alpine+credential helpers image generation (again) #239

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
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
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