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也在我所在的目录中。
发布于 2021-01-20 00:01:49
要构建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 .https://stackoverflow.com/questions/65794617
复制相似问题