Skip to content

Commit 8f19b9b

Browse files
author
anindyatahsin
authored
Update Dockerfile for :latest and :slim image to remove the docker dependency
We are removing the `docker` dependency from all Google Cloud CLI Docker images to mitigate customers’ exposure to vulnerabilities found in this component and its dependencies according to the following timeline. If your workflows rely on `docker`, you will need to pin to the respective `Pin-To` gcloud version or earlier. Alternatively, you could build your own docker image and include `docker` using a custom Dockerfile. Here are some examples: [Dockerfile Examples](https://cloud.google.com/sdk/docs/dockerfile_example). For any questions or concerns about the change, reach out to the [gcloud support team](https://b.corp.google.com/issues/new?component=187143&pli=1&template=800102). | Date | Removed in gcloud version | `Pin-to` gcloud version to continue using `docker` | `docker` removed from images | |:----------:|:-------------------------------------------:|:--------------------:|:----------:| | Jul 01, 2025 | 529.0.0 | 528.0.0 | `:alpine` and `:debian_component_based` | | Jul 22, 2025 | 531.0.0 | 530.0.0 | `:slim` and `:latest` | As part of the change, this PR is removing `docker` package from the `:alpine` and the `:debian_component_based` images.
1 parent 3403414 commit 8f19b9b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
FROM docker:28.2.2 as static-docker-source
2-
31
FROM marketplace.gcr.io/google/debian12:latest
42
ARG CLOUD_SDK_VERSION
53
ENV CLOUD_SDK_VERSION=$CLOUD_SDK_VERSION
6-
COPY --from=static-docker-source /usr/local/bin/docker /usr/local/bin/docker
74
RUN groupadd -r -g 1000 cloudsdk && \
85
useradd -r -u 1000 -m -s /bin/bash -g cloudsdk cloudsdk
96

@@ -43,6 +40,6 @@ RUN apt-get update -qqy && apt-get -qqy upgrade && apt-get install -qqy \
4340
gcloud config set component_manager/disable_update_check true && \
4441
gcloud config set metrics/environment docker_image_latest && \
4542
gcloud --version && \
46-
docker --version && kubectl version --client
43+
kubectl version --client
4744
RUN git config --system credential.'https://source.developers.google.com'.helper gcloud.sh
4845
VOLUME ["/root/.config", "/root/.kube"]

0 commit comments

Comments
 (0)