From c7dc578789e40cfa7bd17ca781b0cd1b1bae26eb Mon Sep 17 00:00:00 2001 From: Kyle Montgomery Date: Thu, 20 Jun 2024 18:27:02 +0000 Subject: [PATCH] Use gcloud as a docker credential helper for all registries. This will make the image a bit easier to use CI where docker auth is required. --- Dockerfile | 1 + alpine/Dockerfile | 1 + debian_component_based/Dockerfile | 1 + debian_slim/Dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8453c113..676d9739 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,4 +42,5 @@ RUN apt-get install -qqy \ gcc \ python3-pip RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh +RUN gcloud auth configure-docker --quiet --include-artifact-registry VOLUME ["/root/.config", "/root/.kube"] diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 84eedf6c..b1aa1216 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -27,4 +27,5 @@ RUN ARCH=`cat /tmp/arch` && apk --no-cache upgrade && apk --no-cache add \ gcloud config set metrics/environment github_docker_image && \ gcloud --version RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh +RUN gcloud auth configure-docker --quiet --include-artifact-registry VOLUME ["/root/.config"] diff --git a/debian_component_based/Dockerfile b/debian_component_based/Dockerfile index 74bb6819..c38ebd94 100644 --- a/debian_component_based/Dockerfile +++ b/debian_component_based/Dockerfile @@ -31,4 +31,5 @@ RUN if [ `uname -m` = 'x86_64' ]; then echo -n " appctl nomos anthos-auth" >> /t RUN /google-cloud-sdk/install.sh --bash-completion=false --path-update=true --usage-reporting=false \ --additional-components `cat /tmp/additional_components` && rm -rf /google-cloud-sdk/.install/.backup RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh +RUN gcloud auth configure-docker --quiet --include-artifact-registry VOLUME ["/root/.config", "/root/.kube"] diff --git a/debian_slim/Dockerfile b/debian_slim/Dockerfile index 6a3106af..64888e8a 100644 --- a/debian_slim/Dockerfile +++ b/debian_slim/Dockerfile @@ -30,4 +30,5 @@ RUN apt-get update -qqy && apt-get -qqy upgrade && apt-get install -qqy \ gcloud --version && \ docker --version RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh +RUN gcloud auth configure-docker --quiet --include-artifact-registry VOLUME ["/root/.config"]