Refactor Dockerfiles to use ARG for base images and add ACR sync work…#4952
Open
maxmartin-cgi wants to merge 8 commits into
Open
Refactor Dockerfiles to use ARG for base images and add ACR sync work…#4952maxmartin-cgi wants to merge 8 commits into
maxmartin-cgi wants to merge 8 commits into
Conversation
Unit Test Results744 tests 744 ✅ 9s ⏱️ Results for commit 593e48f. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces CI/CD failures caused by Docker Hub rate limiting by enabling Docker builds to optionally pull common base images from an Azure Container Registry (ACR) mirror instead of directly from Docker Hub.
Changes:
- Refactors multiple Dockerfiles to parameterize their base images via
ARG, enabling base image source overrides at build time. - Updates the Docker image build GitHub Actions workflow to pass base-image build args derived from the
ACR_BASE_IMAGE_PREFIXvariable. - Adds a new scheduled/manual GitHub Actions workflow to sync (mirror) selected upstream base images into ACR, and documents the new configuration.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
templates/workspace_services/guacamole/guacamole-server/docker/Dockerfile |
Parameterizes Maven + guacd base images via ARG for ACR mirroring. |
templates/workspace_services/gitea/docker/Dockerfile |
Parameterizes the upstream Gitea base image repo via ARG. |
templates/shared_services/gitea/docker/Dockerfile |
Parameterizes the upstream Gitea base image repo via ARG. |
resource_processor/vmss_porter/Dockerfile |
Parameterizes Python base image via ARG. |
api_app/Dockerfile |
Parameterizes Python base image via ARG. |
.github/workflows/build_docker_images.yml |
Passes build args to select builds so they can use mirrored base images when configured. |
.github/workflows/sync_acr_base_images.yml |
New workflow to periodically import selected upstream base images into ACR. |
docs/tre-admins/setup-instructions/workflows.md |
Documents ACR_BASE_IMAGE_PREFIX and the new ACR base image sync workflow. |
docs/tre-admins/setup-instructions/cicd-pre-deployment-steps.md |
Documents ACR_BASE_IMAGE_PREFIX and the new ACR base image sync workflow. |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 |
| persist-credentials: false | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v4 |
| fi | ||
|
|
||
| - name: Azure Login | ||
| uses: azure/login@v3 |
…github.com/microsoft/AzureTRE into maxmartin-cgi/utilise-acr-for-docker-pulls
Collaborator
Author
|
/test-extended |
|
🤖 pr-bot 🤖 🏃 Running extended tests: https://github.com/microsoft/AzureTRE/actions/runs/29093980082 (with refid (in response to this comment from @maxmartin-cgi) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…flow
Resolves #4917
What is being addressed
Pipeline runs fail with a 429: TOOMANYREQUESTS error whenever we hit rate limits on Docker Hub. This blocks all development and CICD pipeline runs until that limit expires. Here's an example.
How is this addressed