I just downloaded Docker Toolbox for Windows 10 64bit today. I'm going through the tutorial. I'm receving the following error when trying to build an image using a Dockerfile.
Steps:
- Launched Docker Quickstart terminal.
- testdocker after creating it.
- Prepare Dockerfile as documented in "Build your own image" web link
- ran "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: I tried several options mentioned @ 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
while executing following command:
check that Dockerfile is present in your current working directory.
I tried this and it worked:
Please see quotes+un-quotes around the foldername.
Note: In Folder
"C:\Users\ssundarababu\Documents\Docker\Learn\SimpleDockerfile"
I have my Dockerfile.I had named my file dockerfile instead of Dockerfile (capitalized), and once I changed that, it started processing my "Dockerfile".
On Mac it works for below command. (hope your
.Dockerfile
is in your root directory).Just Remove the extension .txt from Dockerfile and run the command
It will work for sure.
In WSL, there seems to be a problem with path conversion. The location of the Dockerfile in Ubuntu (where I'm running docker and where Dockerfile lives) is "/home/sxw455/App1", but neither of these commands worked:
But in Windows, the actual path is:
And so I had to do this (even though I ran it from bash):
I had similar problems with environment variables during the initial installation, and followed some advice that said to install the Windows DockerCE and hack the environment variables rather than installing the Ubuntu DockerCE, because (I hope I remembered this correctly) that WSL does not fully implement systemctl. Once the Windows Docker CE installation is done and environment variables are set, docker then works fine under WSL/Ubuntu.