-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
Description
Module
Core
Testcontainers version
1.20.1
Using the latest Testcontainers version?
Yes
Host OS
Mac OS
Host Arch
ARM
Docker version
Client:
Version: 27.2.0
API version: 1.47
Go version: go1.21.13
Git commit: 3ab4256
Built: Tue Aug 27 14:14:45 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.34.0 (165256)
Engine:
Version: 27.2.0
API version: 1.47 (minimum version 1.24)
Go version: go1.21.13
Git commit: 3ab5c7d
Built: Tue Aug 27 14:15:41 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.20
GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353
runc:
Version: 1.1.13
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0
What happened?
Trying to pull a Docker image that only has linux/amd64
as a platform causes com.github.dockerjava.api.exception.NotFoundException
.
If the image manifest in the registry doesn't contain the platform it is pulled for, the registry will return 404 with the following body: {"message":"no match for platform in manifest: not found"}
. Docker-java will throw com.github.dockerjava.api.exception.NotFoundException
in such case (instead of DockerClientException
), so the fallback to x86 will never be attempted.
See:
testcontainers-java/core/src/main/java/org/testcontainers/images/RemoteDockerImage.java
Lines 156 to 163 in 0217e78
try { | |
return pullImageCmd.exec(new TimeLimitedLoggedPullImageResultCallback(logger)).awaitCompletion(); | |
} catch (DockerClientException e) { | |
// Try to fallback to x86 | |
return pullImageCmd | |
.withPlatform("linux/amd64") | |
.exec(new TimeLimitedLoggedPullImageResultCallback(logger)) | |
.awaitCompletion(); |
Relevant log output
No response
Additional Information
No response