我遇到了与 Docker OS 容器和主机 OS 不兼容的问题。
Sending build context to Docker daemon 5.724GB
Step 1/6 : FROM mcr.microsoft.com/windows/servercore:1909-amd64
1909-amd64: Pulling from windows/servercore
a Windows version 10.0.18363-based image is incompatible with a 10.0.17763 host
我见过其他 SO 线程,其中的解决方法是更新主机操作系统以匹配目标容器操作系统版本。
有什么办法可以跳过这个拉取验证吗?
我们使用虚拟机仅用于构建 docker 镜像并传送它们,而不是运行容器(即使 docker build 一路创建容器)。
答案 0 :(得分:0)
我觉得除了换系统别无他法 我曾经遇到过这样的问题,我使用 amr64 机器处理 amd64 图像,但它不起作用
https://forums.docker.com/t/standard-init-linux-go-190-exec-user-process-caused-exec-format-error/49368/5 https://forums.docker.com/t/standard-init-linux-go-190-exec-user-process-caused-exec-format-error/49368/5
通常是您将在此输出中获得的任何图像的兼容性信息 您可以在您的系统上尝试 mcr.microsoft.com/windows/servercore:1909-amd64
docker manifest inspect ‐‐verbose rust:1.42-slim-buster
[
{
"Ref": "docker.io/library/rust:1.42-slim-buster@sha256:1bf29985958d1436197c3b507e697fbf1ae99489ea69e59972a30654cdce70cb",
"Descriptor": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:1bf29985958d1436197c3b507e697fbf1ae99489ea69e59972a30654cdce70cb",
"size": 742,
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
"SchemaV2Manifest": { ... }
},
{
"Ref": "docker.io/library/rust:1.42-slim-buster@sha256:116d243c6346c44f3d458e650e8cc4e0b66ae0bcd37897e77f06054a5691c570",
"Descriptor": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:116d243c6346c44f3d458e650e8cc4e0b66ae0bcd37897e77f06054a5691c570",
"size": 742,
"platform": {
"architecture": "arm",
"os": "linux",
"variant": "v7"
}
},
"SchemaV2Manifest": { ... }
...
]