Skip to content

Conversation

@menahyouyeah
Copy link
Contributor

Description
Use mirror in Dockerfiles for integration tests to prevent docker hub rate limits

@menahyouyeah menahyouyeah requested a review from a team as a code owner February 9, 2026 21:39
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @menahyouyeah, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a widespread change across various Dockerfiles within the project, primarily to address potential Docker Hub rate limiting issues. By switching to mirror.gcr.io/library/ for base images, the build process for integration tests and examples should become more reliable. Additionally, a few Go-related Dockerfiles received minor version bumps and a go mod tidy command for improved dependency management.

Highlights

  • Docker Hub Rate Limit Mitigation: Updated numerous Dockerfiles across the repository to use mirror.gcr.io/library/ as a prefix for base images. This change aims to prevent issues caused by Docker Hub rate limits during image pulls, particularly for integration tests.
  • Go Version Updates: Specifically in integration/examples/grpc-e2e-tests/cloud-spanner-bootstrap/Dockerfile and integration/examples/grpc-e2e-tests/service/Dockerfile, the Go base image version was updated from golang:1.19 to golang:1.23.
  • Go Module Tidy Command: The integration/examples/grpc-e2e-tests/service/Dockerfile now includes a go mod tidy command before go build to ensure module dependencies are correctly managed.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • deploy/skaffold/Dockerfile.deps
    • Changed all FROM alpine:3.21.2 instructions to FROM mirror.gcr.io/library/alpine:3.21.2.
    • Changed FROM ubuntu:24.04 to FROM mirror.gcr.io/library/ubuntu:24.04.
    • Changed COPY --from=docker:28.1.1 to COPY --from=mirror.gcr.io/library/docker:28.1.1.
    • Changed COPY --from=docker/buildx-bin:0.23.0 to COPY --from=mirror.gcr.io/docker/buildx-bin:0.23.0.
    • Changed COPY --from=golang:1.25.5 to COPY --from=mirror.gcr.io/library/golang:1.25.5.
  • examples/compose/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/cross-platform-builds/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/custom-buildx/Dockerfile
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/custom-tests/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/docker-deploy/bert/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3.10 to FROM mirror.gcr.io/library/alpine:3.10.
  • examples/docker-deploy/ernie/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3.10 to FROM mirror.gcr.io/library/alpine:3.10.
  • examples/gcb-kaniko/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/generate-pipeline/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/getting-started-kustomize/app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3.10 to FROM mirror.gcr.io/library/alpine:3.10.
  • examples/getting-started/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/google-cloud-build/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/grpc-e2e-tests/cloud-spanner-bootstrap/Dockerfile
    • Updated FROM golang:1.19 to FROM mirror.gcr.io/library/golang:1.19.
  • examples/grpc-e2e-tests/service/Dockerfile
    • Updated FROM golang:1.19 to FROM mirror.gcr.io/library/golang:1.19.
  • examples/helm-deployment/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3.10 to FROM mirror.gcr.io/library/alpine:3.10.
  • examples/helm-render/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3.10 to FROM mirror.gcr.io/library/alpine:3.10.
  • examples/kaniko/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/lifecycle-hooks/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/microservices/leeroy-app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • examples/microservices/leeroy-web/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • examples/multi-config-microservices/leeroy-app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • examples/multi-config-microservices/leeroy-web/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • examples/multiple-renderers/backend/src/Dockerfile
    • Updated FROM golang:1.17 to FROM mirror.gcr.io/library/golang:1.17.
  • examples/multiple-renderers/frontend/src/Dockerfile
    • Updated FROM golang:1.17 to FROM mirror.gcr.io/library/golang:1.17.
  • examples/profile-patches/base-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/profile-patches/hello-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/profile-patches/world-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/profiles/hello-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/profiles/world-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/simple-artifact-dependency/app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • examples/simple-artifact-dependency/base/Dockerfile
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/structure-tests/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/tagging-with-environment-variables/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • examples/using-env-file/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
    • Updated FROM alpine:3 to FROM mirror.gcr.io/library/alpine:3.
  • integration/examples/compose/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/cross-platform-builds/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/custom-tests/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/docker-deploy/bert/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/docker-deploy/ernie/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/gcb-kaniko/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/generate-pipeline/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/getting-started-kustomize/app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/getting-started/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/google-cloud-build/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/grpc-e2e-tests/cloud-spanner-bootstrap/Dockerfile
    • Updated FROM golang:1.19 to FROM mirror.gcr.io/library/golang:1.23.
  • integration/examples/grpc-e2e-tests/service/Dockerfile
    • Updated FROM golang:1.19 to FROM mirror.gcr.io/library/golang:1.23.
    • Added go mod tidy before the go build command.
  • integration/examples/helm-deployment/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/helm-render/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/kaniko/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/lifecycle-hooks/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/microservices/leeroy-app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/microservices/leeroy-web/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/multi-config-microservices/leeroy-app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/multi-config-microservices/leeroy-web/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/multiple-renderers/backend/src/Dockerfile
    • Updated FROM golang:1.17 to FROM mirror.gcr.io/library/golang:1.17.
  • integration/examples/multiple-renderers/frontend/src/Dockerfile
    • Updated FROM golang:1.17 to FROM mirror.gcr.io/library/golang:1.17.
  • integration/examples/profile-patches/base-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/profile-patches/hello-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/profile-patches/world-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/profiles/hello-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/profiles/world-service/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/simple-artifact-dependency/app/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/structure-tests/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/tagging-with-environment-variables/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/examples/using-env-file/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/build/docker-with-platform-amd/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/build/docker-with-platform-arm/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/build/gcb-with-platform/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/build/squash/Dockerfile
    • Updated FROM alpine to FROM mirror.gcr.io/library/alpine.
  • integration/testdata/cache/app/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/custom-actions-k8s/app/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/custom-actions-local/app/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/debug/go/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/debug/nodejs/Dockerfile
    • Updated FROM node:14.9-alpine to FROM mirror.gcr.io/library/node:14.9-alpine.
  • integration/testdata/debug/npm/Dockerfile
    • Updated FROM node:14.9-alpine to FROM mirror.gcr.io/library/node:14.9-alpine.
  • integration/testdata/debug/specified-runtime/Dockerfile
    • Updated FROM node:14.9-alpine to FROM mirror.gcr.io/library/node:14.9-alpine.
  • integration/testdata/deploy-multiple/kubectl/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/docker-deploy/bert/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/docker-deploy/ernie/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/docker-run-with-build-args/artifact-with-dependency/base/Dockerfile
    • Updated FROM golang:1.23 to FROM mirror.gcr.io/library/golang:1.23.
  • integration/testdata/docker-run-with-build-args/artifact-with-dependency/child/Dockerfile
    • Updated FROM alpine to FROM mirror.gcr.io/library/alpine.
  • integration/testdata/empty-dir/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/fix/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/gcb-explicit-repo/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/gcb-sub-folder/sub/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/gcb-with-location/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/getting-started/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/gke_loadbalancer-render/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/gke_loadbalancer/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/hello/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/helm-multi-config/app1/Dockerfile
    • Updated FROM alpine to FROM mirror.gcr.io/library/alpine.
  • integration/testdata/helm-multi-config/app2/Dockerfile
    • Updated FROM alpine to FROM mirror.gcr.io/library/alpine.
  • integration/testdata/helm-multi-namespaces/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/helm-render-delete/Dockerfile
    • Updated FROM nginx:stable to FROM mirror.gcr.io/library/nginx:stable.
  • integration/testdata/helm-render/Dockerfile
    • Updated FROM nginx:stable to FROM mirror.gcr.io/library/nginx:stable.
  • integration/testdata/helm-statefulset-v1-schema/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/helm/Dockerfile
    • Updated FROM nginx:stable to FROM mirror.gcr.io/library/nginx:stable.
  • integration/testdata/init/compose/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/init/hello/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/init/helm-project/hello-world/src/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/init/microservices/leeroy-app/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/init/microservices/leeroy-web/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/kaniko-explicit-repo/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/kaniko-insecure-registry/app/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/kaniko-microservices/leeroy-app/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/kaniko-microservices/leeroy-web/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
  • integration/testdata/kaniko-sub-folder/sub/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/kaniko-target/Dockerfile
    • Updated FROM golang:1.15-alpine to FROM mirror.gcr.io/library/golang:1.15-alpine.
  • integration/testdata/kubectl-with-default-namespace/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/multi-config-dependencies-order/module1/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/multi-config-dependencies-order/module2/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/multi-config-dependencies-order/module3/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/multi-config-dependencies-order/module4/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/multi-config-pods/module1/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/multi-config-pods/module2/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/post-render-hooks/module1/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/post-render-hooks/module2/Dockerfile
    • Updated FROM golang:1.18 to FROM mirror.gcr.io/library/golang:1.18.
  • integration/testdata/status-check-tolerance/tolerance-check/Dockerfile
    • Updated FROM alpine:latest to FROM mirror.gcr.io/library/alpine:latest.
  • integration/testdata/test-events/Dockerfile
    • Updated FROM golang:1.19 to FROM mirror.gcr.io/library/golang:1.19.
  • integration/testdata/verify-succeed/app/Dockerfile
    • Updated FROM golang:1.15 to FROM mirror.gcr.io/library/golang:1.15.
Activity
  • The pull request was opened by @menahyouyeah with a clear intent to use image mirrors to prevent Docker Hub rate limits.
  • The author implemented changes across numerous Dockerfiles, replacing direct Docker Hub references with mirror.gcr.io/library/ prefixes.
  • Specific Go version updates and a go mod tidy command were introduced in certain integration test Dockerfiles.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request makes a widespread and consistent change to use mirror.gcr.io for Docker base images, which is a great step towards avoiding Docker Hub rate limits. The changes across the numerous Dockerfiles look correct.

I have one suggestion for improving the maintainability of deploy/skaffold/Dockerfile.deps.

I also noticed a couple of potential omissions you might want to address to ensure complete coverage:

  • In examples/custom-buildx/Dockerfile, the builder stage FROM --platform=$BUILDPLATFORM golang:alpine AS builder still seems to be pulling from Docker Hub.
  • The file deploy/skaffold/Dockerfile.lts appears to be unmodified and still contains several FROM instructions pointing to Docker Hub images (e.g., alpine:3.10, ubuntu:20.04).

If these were not intentional, it would be good to update them as well.


# Download kubectl
FROM alpine:3.21.2 as download-kubectl
FROM mirror.gcr.io/library/alpine:3.21.2 as download-kubectl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid repeating the same image string multiple times, you could define the Alpine image as a build argument at the top of the file (e.g., near ARG ARCH=amd64) and reuse it in each stage. This makes future updates to the base image much easier.

For example:

ARG ALPINE_IMAGE=mirror.gcr.io/library/alpine:3.21.2

# ... later in the file
FROM ${ALPINE_IMAGE} as download-kubectl

You can then apply this pattern to all the other download-* stages in this file that use the same Alpine image.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider using an ARG for the prefix in this an all other files. Should be a quick change using an AI agent / co-pilot. It will allow smaller changes going forward if it has to be changed again.

kkarrenn
kkarrenn previously approved these changes Feb 10, 2026
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: unnecessary space

@menahyouyeah menahyouyeah merged commit a2bfb30 into GoogleContainerTools:main Feb 10, 2026
12 of 13 checks passed
@menahyouyeah menahyouyeah deleted the docker-mirror-updates branch February 10, 2026 21:44
Darien-Lin pushed a commit to Darien-Lin/skaffold that referenced this pull request Feb 12, 2026
… rate limits (GoogleContainerTools#9970)

* use mirror in Dockerfiles for integration tests

* use argument prefix instead

* fix for multi stage

* more fixes

* fix buildx-bin error

* Bring back comments

* missed a comment
@Darien-Lin Darien-Lin mentioned this pull request Feb 12, 2026
Darien-Lin added a commit that referenced this pull request Feb 12, 2026
* chore: bump github.com/sigstore/cosign/v2 from 2.6.1 to 2.6.2 (#9948)

Bumps [github.com/sigstore/cosign/v2](https://github.com/sigstore/cosign) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/sigstore/cosign/releases)
- [Changelog](https://github.com/sigstore/cosign/blob/main/CHANGELOG.md)
- [Commits](sigstore/cosign@v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: github.com/sigstore/cosign/v2
  dependency-version: 2.6.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* cicd: bazel github presubmit flow fixes for recent bazel 9.0.0 release (#9961)

bazel build fixes for recent bazel 9.0.0 release

* chore: bump github.com/sigstore/sigstore from 1.10.3 to 1.10.4 (#9957)

Bumps [github.com/sigstore/sigstore](https://github.com/sigstore/sigstore) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/sigstore/sigstore/releases)
- [Commits](sigstore/sigstore@v1.10.3...v1.10.4)

---
updated-dependencies:
- dependency-name: github.com/sigstore/sigstore
  dependency-version: 1.10.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump github.com/sigstore/rekor from 1.4.3 to 1.5.0 (#9956)

Bumps [github.com/sigstore/rekor](https://github.com/sigstore/rekor) from 1.4.3 to 1.5.0.
- [Release notes](https://github.com/sigstore/rekor/releases)
- [Changelog](https://github.com/sigstore/rekor/blob/main/CHANGELOG.md)
- [Commits](sigstore/rekor@v1.4.3...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/sigstore/rekor
  dependency-version: 1.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump github.com/theupdateframework/go-tuf/v2 from 2.3.0 to 2.4.1 (#9962)

Bumps [github.com/theupdateframework/go-tuf/v2](https://github.com/theupdateframework/go-tuf) from 2.3.0 to 2.4.1.
- [Release notes](https://github.com/theupdateframework/go-tuf/releases)
- [Commits](theupdateframework/go-tuf@v2.3.0...v2.4.1)

---
updated-dependencies:
- dependency-name: github.com/theupdateframework/go-tuf/v2
  dependency-version: 2.4.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test(integration): Update busybox and alpine:3 to use the mirror to avoid docker rate hub limit errors (#9966)

test(integration): mirror busybox and alpine:3 images to gcr.io

* chore: bump github.com/go-git/go-git/v5 from 5.16.3 to 5.16.5 (#9971)

Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.16.3 to 5.16.5.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](go-git/go-git@v5.16.3...v5.16.5)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.16.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump golang.org/x/oauth2 from 0.7.0 to 0.27.0 in /examples/grpc-e2e-tests/service (#9918)

chore: bump golang.org/x/oauth2 in /examples/grpc-e2e-tests/service

Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.7.0 to 0.27.0.
- [Commits](golang/oauth2@v0.7.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-version: 0.27.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: bump golang.org/x/crypto from 0.36.0 to 0.45.0 in /hack/tools (#9916)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.36.0 to 0.45.0.
- [Commits](golang/crypto@v0.36.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use mirror in Dockerfiles for integration tests to prevent docker hub rate limits (#9970)

* use mirror in Dockerfiles for integration tests

* use argument prefix instead

* fix for multi stage

* more fixes

* fix buildx-bin error

* Bring back comments

* missed a comment

* chore: upgrade golang to 1.25.7 (#9973)

Co-authored-by: Darien-Lin <darienl@google.com>

* Updated Dockerfile to try to fix vuln bug (#9974)

* Updated Dockerfile to try to fix vuln bug

* Addressed the gemini-code-assist comments

* Fixed the dockerfile so it runs using docker build -f deploy/webhook-v2/Dockerfile .

* Updated the node version to fix error (#9976)

* Updated Dockerfile to try to fix vuln bug

* Addressed the gemini-code-assist comments

* Fixed the dockerfile so it runs using docker build -f deploy/webhook-v2/Dockerfile .

* Updated node version to try and fix error

* chore: fixing docs due to upgrade in Hugo (#9977)

fixing docs due to upgrade in Hugo

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: menahyouyeah <minnah@google.com>
Co-authored-by: Darien-Lin <darienl@google.com>
Co-authored-by: ruhi-chaddha <ruhichaddha@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants