fix: pass Docker Hub credentials for images without a registry prefix#935
Merged
DDtKey merged 2 commits intotestcontainers:mainfrom Apr 13, 2026
Merged
Conversation
✅ Deploy Preview for testcontainers-rust ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
DDtKey
approved these changes
Apr 12, 2026
Contributor
|
Thank you for the contribution! |
Merged
DDtKey
pushed a commit
that referenced
this pull request
Apr 15, 2026
## 🤖 New release * `testcontainers`: 0.27.2 -> 0.27.3 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.27.3] - 2026-04-15 ### Details #### Bug Fixes - Pass Docker Hub credentials for images without a registry prefix ([#935](#935)) #### Miscellaneous Tasks - Update docker-compose-types requirement from 0.22 to 0.23 ([#931](#931)) - Update ferroid requirement from 0.8.7 to 2.0.0 ([#929](#929)) - Update russh requirement from 0.56.0 to 0.60.0 ([#933](#933)) - Update signal-hook requirement from 0.3 to 0.4 ([#934](#934)) - Update temp-dir requirement from 0.1 to 0.2 ([#921](#921)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
We kept hitting Docker Hub rate limits (
429 Too Many Requests: You have reached your unauthenticated pull rate limit) when running tests, despite being logged in viadocker login. Traced it tocredentials_for_image— it callsdescriptor.split_once('/')to extract the registry, which returnsNonefor standard Docker Hub images likepostgres:16(no slash). So credentials are never looked up and pulls go unauthenticated.This adds a
resolve_registry()helper that defaults toindex.docker.iowhen the image has no explicit registry prefix, matching how the Docker CLI resolves it.