使用 buildkit 进行 docker 构建失败并出现奇怪的错误
我正在尝试使用 docker buildkit 构建 docker 镜像,但是出了问题,构建过程失败:
$ DOCKER_BUILDKIT=1 docker build .
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 39B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /home/docker/100000.100000/tmp/buildkit-mount158723236/Dockerfile: no such file or directory
这就是 Dockerfile 的样子:
$ cat Dockerfile
# docker/dockerfile:1
FROM alpine
RUN mkdir -p /dir/a/b/c
Docker 版本:
$ docker --version
Docker version 20.10.12, build e91ed57
在其他机器上也同样有效,所以我估计应该是局部的一些问题。但它可能是什么?
I am trying to build a docker image using docker buildkit, but something goes wrong, and the building process fails:
$ DOCKER_BUILDKIT=1 docker build .
[+] Building 0.1s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 39B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /home/docker/100000.100000/tmp/buildkit-mount158723236/Dockerfile: no such file or directory
That is how the Dockerfile
looks like:
$ cat Dockerfile
# docker/dockerfile:1
FROM alpine
RUN mkdir -p /dir/a/b/c
Docker version:
$ docker --version
Docker version 20.10.12, build e91ed57
The same works on other machines, so I suppose that it should be some local problems. But what could it be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论