From 22512c54b16b004efa8c323f4b9c999786a4c196 Mon Sep 17 00:00:00 2001 From: Nate Williams Date: Wed, 11 Mar 2020 13:51:24 -0600 Subject: [PATCH] Ensure we use a blank docker config file to avoid issues with the default config.json which requires credentials accessing gcr.io registries - Users who require credentials will need to supply their own config.json file anyway, so let them set it up as needed. --- deploy/Dockerfile_debug | 2 ++ deploy/Dockerfile_warmer | 2 ++ 2 files changed, 4 insertions(+) diff --git a/deploy/Dockerfile_debug b/deploy/Dockerfile_debug index a57151babc..780426f6cc 100644 --- a/deploy/Dockerfile_debug +++ b/deploy/Dockerfile_debug @@ -27,6 +27,8 @@ RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/dock RUN make -C /go/src/github.com/awslabs/amazon-ecr-credential-helper linux-amd64 COPY . . RUN make GOARCH=${GOARCH} && make out/warmer +# Blank out the credentials file +RUN echo "{}" > /root/.docker/config.json # Stage 1: Get the busybox shell FROM gcr.io/cloud-builders/bazel:latest diff --git a/deploy/Dockerfile_warmer b/deploy/Dockerfile_warmer index b81df44130..e5cb4dfdb4 100644 --- a/deploy/Dockerfile_warmer +++ b/deploy/Dockerfile_warmer @@ -24,6 +24,8 @@ RUN docker-credential-gcr configure-docker # Get Amazon ECR credential helper RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login RUN make -C /go/src/github.com/awslabs/amazon-ecr-credential-helper linux-amd64 +# Blank out the credentials file +RUN echo "{}" > /root/.docker/config.json COPY . . RUN make GOARCH=${GOARCH} out/warmer