mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-17 21:11:54 +02:00
Add credential helper and docs for pushing to Amazon ECR
This commit is contained in:
@@ -21,10 +21,15 @@ RUN make
|
||||
WORKDIR /usr/local/bin
|
||||
ADD https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v1.4.3-static/docker-credential-gcr_linux_amd64-1.4.3.tar.gz .
|
||||
RUN tar -xvzf /usr/local/bin/docker-credential-gcr_linux_amd64-1.4.3.tar.gz
|
||||
# Get Amazon ECR credential helper
|
||||
RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
|
||||
WORKDIR /go/src/github.com/awslabs/amazon-ecr-credential-helper
|
||||
RUN make linux-amd64
|
||||
|
||||
FROM scratch
|
||||
COPY --from=0 /go/src/github.com/GoogleContainerTools/kaniko/out/executor /kaniko/executor
|
||||
COPY --from=0 /usr/local/bin/docker-credential-gcr /usr/local/bin/docker-credential-gcr
|
||||
COPY --from=0 /go/src/github.com/awslabs/amazon-ecr-credential-helper/bin/linux-amd64/ /usr/local/bin/
|
||||
COPY files/ca-certificates.crt /kaniko/ssl/certs/
|
||||
COPY files/config.json /root/.docker/
|
||||
RUN ["docker-credential-gcr", "config", "--token-source=env"]
|
||||
|
||||
Reference in New Issue
Block a user