Skip to content

Commit

Permalink
Ensure we use a blank docker config file to avoid issues with the def…
Browse files Browse the repository at this point in the history
…ault 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.
  • Loading branch information
filesnate committed Mar 11, 2020
1 parent c718dc6 commit 22512c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/Dockerfile_debug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions deploy/Dockerfile_warmer
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22512c5

Please sign in to comment.