[Enhancement/Bug*]: Testcontainers does not fall back to linux/amd64 when registry returns missing architecture

未關閉
#11,782 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@anushkasrvstv 已經在處理了。

開始於 2026年6月4日。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
docker, java
領域
devops, testing-qa

研究方向

先閱讀 issue 9214 和 pull request 9200,接著找出現有對 DockerClientException 和 NotFoundException 的 fallback 處理。根據所描述的 registry 行為重現 arm64 映像檔拉取失敗,並檢查相關測試。當缺少架構時的回應得到一致處理,或所要求的架構/fallback 選項獲得明確支援時,即視為完成。

由索引模型根據 Issue 內容生成。

描述

type/bug
Module

Core

Testcontainers version

1.21.4

Using the latest Testcontainers version?

Yes

Host OS

Mac

Host Arch

arm64

Docker version
podman version
Client:        Podman Engine
Version:       5.6.2
API Version:   5.6.2
Go Version:    go1.25.1
Git Commit:    9dd5e1ed33830612bc200d7a13db00af6ab865a4
Built:         Tue Sep 30 21:35:47 2025
Build Origin:  pkginstaller
OS/Arch:       darwin/arm64

Server:       Podman Engine
Version:      5.6.2
API Version:  5.6.2
Go Version:   go1.24.7
Git Commit:   9dd5e1ed33830612bc200d7a13db00af6ab865a4
Built:        Tue Sep 30 02:00:00 2025
OS/Arch:      linux/arm64
What happened?

Expected behavior
When pulling a Docker image that only provides a linux/amd64 platform, Testcontainers should automatically fall back to linux/amd64 on ARM-based hosts (e.g. Apple Silicon Macs), as it already does for DockerClientException and NotFoundException.

Actual behavior
Registries like JFrog Artifactory may return:
com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"no image found in manifest list for architecture \"arm64\", variant \"v8\", OS \"linux\""}

While the 500 Internal server error from JFrog is arguably misleading/incorrect I still think testcontainers should provide an option to specify the arch or fallback strategy outside of using a direct image SHA.

Relevant log output
com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"no image found in manifest list for architecture \"arm64\", variant \"v8\", OS \"linux\""}

	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
	at java.base/java.lang.Thread.run(Thread.java:1474)

2026-05-27T12:16:09.667+02:00  WARN 46613 --- [    Test worker] [] t.r.b.d.4.0.11-r2                        : Retrying pull for image: registry.bankdata.dev/all-docker-centrals/ibm-messaging/mq:9.4.0.11-r2 (112s remaining)
2026-05-27T12:16:13.150+02:00 ERROR 46613 --- [ream--322867326] [] c.g.d.api.async.ResultCallbackTemplate   : Error during callback

com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"no image found in manifest list for architecture \"arm64\", variant \"v8\", OS \"linux\""}
Additional Information

Issue has great similarity to:
issues/9214:pull/9200
but I am unsure if it qualifies as a bug or an enhancement.

Would love to get some input. Won't fix is a very valid response as the issue is primarily JFrog related.

主要語言
Java
星號
8.8k
分支
2k
平均合併
5 天 21 小時
30 天內合併 PR
15

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

testcontainers/testcontainers-java 的其他 Issue

查看 testcontainers/testcontainers-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。