登录
首页 >  Golang >  Go问答

没有与 windows/amd64 10.0.18362 匹配的清单列表条目

来源:stackoverflow

时间:2024-03-18 19:06:28 292浏览 收藏

**文章首段摘要** 在使用 Docker 构建镜像时,遇到了 "no matching manifest for windows/amd64 10.0.18362 in the manifest list entries" 的错误,原因是 Docker 无法在 Windows 系统上运行带 -alpine 标记的 Linux 容器。

问题内容

我刚刚开始使用 docker。 我安装了 windows 版本的 docker,并按照 https://hub.docker.com/?overlay=onboarding 中给出的一些基本步骤进行操作。

无法构建 docker 文件。

我刚刚从中克隆了一个 git 存储库 作者:

$ git clone https://github.com/docker/doodle.git

然后尝试构建docker

$ cd doodle\cheers2019 ;
$ docker build -t myrepo/cheers2019 .

我在命令行上收到响应:

sending build context to docker daemon  13.31kb
step 1/9 : from golang:1.11-alpine as builder
1.11-alpine: pulling from library/golang
no matching manifest for windows/amd64 10.0.18362 in the manifest list entries

dockerfile 有

FROM golang:1.11-alpine AS builder
RUN apk add --no-cache git
RUN go get github.com/pdevine/go-asciisprite
WORKDIR /project
COPY cheers.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o cheers cheers.go

FROM scratch
COPY --from=builder /project/cheers /cheers
ENTRYPOINT ["/cheers"]

我的电脑规格: windows 10 - amd ryzen5 处理器

amd 处理器有问题吗?请建议我一些方法来解决这个问题。


解决方案


接下来是 docker/doodle issue 9,最后是 includes a workaround

还有更简单的建议:

另一种方法是转到 Docker 桌面并选择Switch to Linux Containers

问题是由于标记的 -alpine 部分造成的,不幸的是没有可在 Windows 上运行的 alpine Linux 容器。

好了,本文到此结束,带大家了解了《没有与 windows/amd64 10.0.18362 匹配的清单列表条目》,希望本文对你有所帮助!关注golang学习网公众号,给大家分享更多Golang知识!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>