Pull dockerhub images for tests using containerd to avoid content digest issues#2179
Open
ryanjbaxter wants to merge 1 commit intospring-cloud:3.3.xfrom
Open
Pull dockerhub images for tests using containerd to avoid content digest issues#2179ryanjbaxter wants to merge 1 commit intospring-cloud:3.3.xfrom
ryanjbaxter wants to merge 1 commit intospring-cloud:3.3.xfrom
Conversation
ryanjbaxter
commented
Mar 12, 2026
|
|
||
| final String[] ctrArgs = buildCtrPullArgs(fullImageRef); | ||
|
|
||
| await().atMost(Duration.ofMinutes(2)).pollInterval(Duration.ofSeconds(1)).until(() -> { |
Contributor
Author
There was a problem hiding this comment.
I will move to Awaitilities when I merge this forward to main
ryanjbaxter
commented
Mar 12, 2026
| } | ||
|
|
||
| private static String[] buildCtrPullArgs(String fullImageRef) { | ||
| String username = System.getenv("DOCKER_HUB_USERNAME"); |
Contributor
Author
There was a problem hiding this comment.
This is a small enhacement I added. One of the advantages of using the docker client on the host to pull the image was we could authenticate with docker hub. This has several benefits, one of those is to avoid being throttled. To avoid being throttled by containerd I wanted to supply creds to pull the image. If these environment properties are set and not empty we will use them as creds when pulling the image.
Contributor
Author
|
@wind57 I closed the previous PR and created one against 3.3.x. It is virtually the same with one small enhancement to supply creds to dockerhub when pulling the images |
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.
Previously we pulled images we needed for tests from DockerHub using Docker client saving the image as a tarball and then load them into the test container using containerd. In some situations this could result in errors when loading the image tarball with containerd using the tarball because the docker client saves the image as a tarball with references for other platforms. For example if running the tests on OSX when we save the image as a tarball using the docker client the tarball not only contains references to content digests for ARM64 but also AMD64. When containerd loads the tarball it sees those references to AMD64 but they actually are not part of the tarball and this results in content digest not found errors.
A more direct approach is to just have containerd pull the images inside the container, this not only avoids the content digest issue, but also avoid the pull, save, load steps we were doing before.