建立ARM64 Docker图像,其基本图像仅支持AMD64
我有一个带有M1的MacBook Pro,并且正在尝试测试是否可以使用仅通过指定-platform Linux/ARM64来支持AMD64的基本图像的ARM64图像。
我用摇杆/R-Ver:4.0.4(仅支持AMD64)进行了测试,并且能够使用以下命令构建,而没有任何错误,
docker build --platform linux/arm64 -t r-ver-arm64:test
我的Dockerfile只是来自Rocker/r-ver:4.0.4
但是,当我使用python测试:3.3-alpine3.4(仅支持AMD64)用命令
docker build --platform linux/arm64 -t python-arm64:test
dockerfile是是
来自python:3.3-alpine3.4
我有一个错误消息,我说没有匹配平台的匹配清单
[+] Building 1.3s (4/4) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 207B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> ERROR [internal] load metadata for docker.io/library/python:3.3-alpine3.4 1.2s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
------
> [internal] load metadata for docker.io/library/python:3.3-alpine3.4:
------
error: failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:32b65b0dd11df5fb4dcf1e0f6bb05007b6b84270959ab27b618b513321ef6d6a: not found
我不明白为什么它适用于r-ver:4.0.4基本图像,但对python:3.3-alpine3.4
有人可以帮助我吗?
I have a MacBook Pro with M1 and I am trying to test if I can build an ARM64 image with a base image that only supports AMD64 by specifying --platform linux/arm64.
I tested with rocker/r-ver:4.0.4(only supports AMD64) and was able to build with this command below without any error
docker build --platform linux/arm64 -t r-ver-arm64:test
my dockerfile is just FROM rocker/r-ver:4.0.4
But when I tested with python:3.3-alpine3.4(supports AMD64 only) with command
docker build --platform linux/arm64 -t python-arm64:test
Dockerfile is FROM python:3.3-alpine3.4
I've got an error message, saying no match for platform in manifest
[+] Building 1.3s (4/4) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 207B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> ERROR [internal] load metadata for docker.io/library/python:3.3-alpine3.4 1.2s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
------
> [internal] load metadata for docker.io/library/python:3.3-alpine3.4:
------
error: failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:32b65b0dd11df5fb4dcf1e0f6bb05007b6b84270959ab27b618b513321ef6d6a: not found
I don't understand why it works for r-ver:4.0.4 base image, but doesn't for python:3.3-alpine3.4
Could someone help me with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论