Use mirrored images for all Docker image references#317
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates CI, build, and example/test artifacts to pull Docker images from the internal registry.ddbuild.io/ci/nginx-datadog/tests/images/ mirror (instead of public registries) to reduce rate limiting and external dependencies, and introduces a MIRROR_REGISTRY build-arg for the musl toolchain build image.
Changes:
- Replace public Docker image references across GitLab CI, Dockerfiles, and docker-compose files with mirrored
registry.ddbuild.ioreferences. - Add
MIRROR_REGISTRYbuild-arg support tobuild_env/Dockerfileand thread it through the local toolchain build target inMakefile. - Update GitHub Actions system-tests workflow to set
MIRROR_REGISTRY=""(public pulls) and adjust shellcheck job file selection.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test/services/client/Dockerfile |
Switch client service base image to mirrored registry. |
test/Dockerfile |
Switch test runner base + uv stage image to mirrored registry. |
injection/ingress-nginx/docker-compose.yaml |
Switch testagent and nginx images to mirrored registry. |
example/tracing/services/client/Dockerfile |
Switch example client base image to mirrored registry. |
example/tracing/docker-compose.yml |
Switch Datadog agent image reference to mirrored registry. |
example/openresty/services/client/Dockerfile |
Switch example client base image to mirrored registry. |
example/openresty/docker-compose.yml |
Switch Datadog agent image reference to mirrored registry. |
example/ingress-nginx/test-application.yaml |
Switch echo-server image to mirrored registry. |
example/ingress-nginx/helm/values.yaml |
Update ingress-nginx extra module image reference to mirrored registry (but currently malformed). |
build_env/Dockerfile |
Add MIRROR_REGISTRY arg; pull uv and alpine via mirror and copy from the uv stage. |
Makefile |
Pass MIRROR_REGISTRY build-arg to local toolchain build when provided. |
.gitlab/common.yml |
Update test job image arguments to mirrored registry. |
.gitlab/build-and-test-fast.yml |
Use mirrored base images in matrix; adjust shellcheck file selection. |
.gitlab/build-and-test-all.yml |
Use mirrored base images in the full test matrix. |
.github/workflows/system-tests.yml |
Set MIRROR_REGISTRY="" for GHA build job to use public registries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
=======================================
Coverage 68.85% 68.85%
=======================================
Files 56 56
Lines 7471 7471
Branches 1058 1058
=======================================
Hits 5144 5144
Misses 1820 1820
Partials 507 507 🚀 New features to boost your workflow:
|
1c9770e to
145d16c
Compare
|
What do you have in mind ? just a shorter URL ? |
10c6e76 to
92b2a12
Compare
- Migrate all Docker image references to use registry.ddbuild.io mirrors - Factorize and simplify registry usage across CI and test configs - Fix OpenResty detection for mirrored base images - Ensure examples are usable outside Datadog internal infrastructure - Add build-step retries in run.py for transient failures - Increase npm fetch-retries in Dockerfiles - Remove CircleCI configuration
8f91483 to
5803576
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
xlamorlette-datadog
left a comment
There was a problem hiding this comment.
Please wait for the on-going delivery (v1.13.0) to be completed before merging this.
- Remove trailing '/' from MIRROR_REGISTRY; use ${MIRROR_REGISTRY}/... syntax
for readability (build_env/Dockerfile, test/Dockerfile)
- Use ARG MIRROR_REGISTRY pattern in test/Dockerfile instead of hardcoding
the registry, matching the build_env/Dockerfile convention
- Simplify run_cmd_with_retries: remove redundant outer try/except and
finally block so failure doesn't print both "BUILD FAILED" and
"Build step finished" (test/bin/run.py)
- Remove duplicate .test-nginx-rum block that was overriding the
mirrored-image version (.gitlab/common.yml)
The no-trailing-slash style breaks when MIRROR_REGISTRY is set to "" (used in GHA for public images), producing invalid refs like "FROM /alpine:3.20.3". The trailing '/' convention handles both cases: - Default: "registry.ddbuild.io/.../mirror/alpine:3.20.3" - Empty: "alpine:3.20.3"
|
Thanks Xavier! |
registry.ddbuild.io/ci/nginx-datadog/mirror/mirrors in CI to avoid rate limitsMIRROR_REGISTRYbuild-arg to Dockerfiles (defaults to mirror; empty for GHA public images)test/bin/run.pyfor transient Docker build failures