Reputation: 305
So, I am new to Docker but after trying a couple of times I can't get this to work.
Basically I have a simple script like this:
Dockerfile
from centos:7
.....
COPY /C:/Users/Kalin/Drive/web/sites/foo.com/ /var/www
EXPOSE 80
Whenever I run docker build everything works as planned except at the COPY part I get this error:
Step 10/11 : COPY /C:/Users/Kalin/Drive/web/sites/foo.com/ /var/www
COPY failed: stat /var/lib/docker/tmp/docker-builder646917435/C:/Users/Kalin/Drive/web/Kalin/foo.com: no such file or directory
I get the error is about not finding a directory, but instead of looking for it starting from C:/..
foldedr it is looking from /var/...
I don't know what mistake I am doing
Upvotes: 1
Views: 1262
Reputation: 4628
I would strongly suggest to make relative path in COPY
command so if you have your docker file in /C:/Users/Kalin
and you are running docker build from that folder, just place Drive/web/sites/foo.com/
in COPY
command
Upvotes: 1