-
Notifications
You must be signed in to change notification settings - Fork 9
fix(deployment): Use SHA256 digests and mirror all external images to GHCR #5772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: corneliusroemer <25161793+corneliusroemer@users.noreply.github.com>
Co-authored-by: corneliusroemer <25161793+corneliusroemer@users.noreply.github.com>
|
@copilot can you please use tagged postgres images? Otherwise we have instability. |
|
@copilot also fix the ci failures please |
Co-authored-by: corneliusroemer <25161793+corneliusroemer@users.noreply.github.com>
Fixed in commit 1fe53c4. The issue was that Flyway images don't exist on ghcr.io - they're only available on Docker Hub. Reverted Flyway images to Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot why don't we then have one single workflow that mirrors all images we use from docker to ghcr under our org. the mirorring agent should dynamically check the versions referenced and pull - using some remapping. e.g. we configure for each image where it's mirrored from in some .github config for mirroring. Does that make sense? Then we can replace the non-ghrc images with those. |
That's a good approach for comprehensive coverage. A mirroring workflow would: Pros:
Considerations:
For the current problem, the postgres migration to ghcr.io/cloudnative-pg/postgresql:15.12 solves the 429 errors. A mirroring workflow could be added later if Docker Hub rate limits become problematic for other images like Flyway. |
|
@copilot yes add this workflow |
Co-authored-by: corneliusroemer <25161793+corneliusroemer@users.noreply.github.com>
Added in commit 82a0797. The workflow:
To add new images, just edit the config file and the workflow will automatically mirror them. |
|
@copilot ok not a bad idea - let's also allow mirroring from any registry to any registry. if we have dockerhub secrets set up (check out other workflows) then use those for pullling. We might also want to mirror quay and k8s so we don't rely on any non-ghcr |
Co-authored-by: corneliusroemer <25161793+corneliusroemer@users.noreply.github.com>
Co-authored-by: corneliusroemer <25161793+corneliusroemer@users.noreply.github.com>
Done in commits 3dff48b and 42f7005:
|
Integration tests were failing with 429 rate limit errors when pulling postgres images from Docker Hub. Replaced all external registry images with mirrored versions from GHCR using SHA256 digests for immutability.
Screenshot
N/A - Infrastructure change only
Changes
Image Mirroring System
All external images are now mirrored to
ghcr.io/loculus-project/with SHA256 digest tracking:.github/docker-image-mirror-config.yaml): Maps source images from any registry (Docker Hub, Quay.io, K8s registry) to GHCR with SHA256 digests.github/workflows/mirror-docker-images.yml): Automated workflow that runs daily at 3 AM UTC to mirror images. Features:All Images Use SHA256 Digests
Every image reference now uses immutable
@sha256:...format instead of tags:ghcr.io/cloudnative-pg/postgresql@sha256:8e08e8d...(5 instances - loculus-database, keycloak-database, workflows)ghcr.io/loculus-project/flyway@sha256:f736d2d...(schema-dump workflow)ghcr.io/loculus-project/flyway@sha256:1398d6a...(ena-submission Dockerfile)ghcr.io/loculus-project/minio@sha256:9966a92...(minio deployment)ghcr.io/loculus-project/keycloak@sha256:461bdab...(keycloak deployment)ghcr.io/loculus-project/busybox@sha256:d8d3bc2...(ingest init container)Mirrored Images
From Docker Hub:
flyway/flyway:10-alpine→ghcr.io/loculus-project/flyway@sha256:f736d2d...flyway/flyway:11.10.0-alpine-mongo→ghcr.io/loculus-project/flyway@sha256:1398d6a...From Quay.io:
quay.io/minio/minio:latest→ghcr.io/loculus-project/minio@sha256:9966a92...quay.io/keycloak/keycloak:23.0→ghcr.io/loculus-project/keycloak@sha256:461bdab...From K8s registry:
registry.k8s.io/busybox:latest→ghcr.io/loculus-project/busybox@sha256:d8d3bc2...Benefits
PR Checklist
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
🚀 Preview: Add
previewlabel to enable