testcontainers-rs icon indicating copy to clipboard operation
testcontainers-rs copied to clipboard

chore(ci): auto-sync Docker Hub images to ghcr.io and switch tests to use them

Open DCjanus opened this issue 3 months ago • 2 comments

Some of the tests currently pull public images from Docker Hub, which can intermittently hit rate limits and cause workflow failures unrelated to any code changes. To make the test runs more reliable, it would help to mirror the images we use and have the tests pull from those mirrors instead.

Proposed Approach

  1. Add a scheduled GitHub Actions workflow

    • Pull the images used by our tests (e.g., alpine, hello-world, etc.) from Docker Hub
    • Push them to our existing location on ghcr.io using the same tags
      This keeps our mirrored copies updated without manual work.
  2. Update the tests
    Switch the image references to the mirrored versions on ghcr.io so they no longer depend on Docker Hub.

If this approach sounds good, I’m happy to open an initial PR that adds the sync workflow and updates the test image references.

DCjanus avatar Nov 28 '25 15:11 DCjanus

Below are several GitHub Actions runs that failed due to Docker Hub rate limiting:

  1. GitHub Action Failure Example 1
  2. GitHub Action Failure Example 2
  3. GitHub Action Failure Example 3

DCjanus avatar Nov 28 '25 16:11 DCjanus

I don't mind

In general, I believe we could get a token for CI from Docker (Docker acquired AtomicJar about 2023, so it might be possible) Can be discussed in Slack though

But suggested approach still looks reasonable for now

DDtKey avatar Dec 01 '25 00:12 DDtKey