gpt4 book ai didi

Dockerfile 构建错误 : The system cannot find the path specified

转载 作者:行者123 更新时间:2023-12-04 11:55:09 24 4
gpt4 key购买 nike

C:\kafka> docker build Dockerfile
[+] Building 0.0s (1/2)
=> ERROR [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 63B 0.0s
------
> [internal] load build definition from Dockerfile:
------
failed to solve with frontend dockerfile.v0: failed to read dockerfile: error from sender: walk Dockerfile: The system cannot find the path specified.

以上是我遇到的错误和命令运行的示例。
我的 Dockerfile 被命名为“Dockerfile”,因为我已经阅读了许多答案,但仍然没有解决。
我的 Dockerfile 也在我所在的目录中。

最佳答案

要构建 docker 镜像:

cd /path/where/docker_file/lives
docker build .
上面是一样的:
docker build -f Dockerfile .
您需要指定 Dockerfile仅当它不是默认值时才命名:
cd /path/where/docker_file/lives
docker build -f Dockerfile.modified .

关于Dockerfile 构建错误 : The system cannot find the path specified,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65794617/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com