我今天刚刚下载了Windows1064位版的Docker工具箱。我正在看教程。在尝试使用Dockerfile构建镜像时,我收到了以下错误。
步骤:
创建Docker Quickstart terminal.
docker build -t docker-whale .
Error: $ docker build -t docker-whale .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx C:\Users\Villanueva\Test\testdocker\Dockerfile: The system cannot find the file specified.
BTW:我尝试了@ https://github.com/docker/docker/issues/14339提到的几个选项
$ docker info
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 2
Server Version: 1.10.1
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 20
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.1.17-boot2docker
Operating System: Boot2Docker 1.10.1 (TCL 6.4.1); master : b03e158 - Thu Feb 11 22:34:01 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 996.2 MiB
Name: default
ID: C7DS:CIAJ:FTSN:PCGD:ZW25:MQNG:H3HK:KRJL:G6FC:VPRW:SEWW:KP7B
Debug mode (server): true
File Descriptors: 32
Goroutines: 44
System Time: 2016-02-19T17:37:37.706076803Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
发布于 2016-07-14 18:00:22
执行以下命令时:
docker build -t docker-whale .
检查Dockerfile是否存在于当前工作目录中。
发布于 2019-08-30 17:47:07
该错误消息具有误导性。这个问题实际上与符号链接无关。通常只是docker找不到描述构建的Dockerfile。
典型的原因如下:
必须将其命名为Dockerfile
。如果它被调用,例如,dockerfile
、.Dockerfile
、Dockerfile.txt
或其他,它将不会是found.
如果您说docker build contextdir
,那么Dockerfile文件必须在contextdir/Dockerfile
中。如果你把它放在,比方说,不存在,它将不会是,found.
./Dockerfile
,,。听起来很傻?嗯,在我写了一个很好的Dockerfile之后,我从我的GitLab CI那里得到了上面的错误消息,但是忘了把它签入。傻吗?好的。不太可能?不是,
发布于 2017-03-02 13:53:56
如果你使用的是windows8,你应该使用Docker工具箱。从mydockerbuild目录运行以下命令,因为您的Dockerfile是一个文本文件
docker build -t docker-whale -f ./Dockerfile.txt .
https://stackoverflow.com/questions/35511604
复制相似问题