Copy files from Windows host to Ubuntu container

Hello, all

Is it posible to use COPY command to copy files from windows host to ubuntu container. I’ve tried many formats of path:

COPY E:/mypath /path/on/ubuntu
COPY E/mypath /path/on/ubuntu
COPY //E/mypath /path/on/ubuntu
COPY E://mypath /path/on/ubuntu
COPY E:\mypath /path/on/ubuntu

NO one works : lstat /e/books: no such file or directory

The path you copy from has to be relative from the build context (the . in docker build .). It cannot be an arbitrary path on the system outside of the build context.

for example, if you are copying from your Windows directory @ C:\test into your Linux container with name <trucky_ganta> the command would be

C:\windows\system32>docker cp C:\test trucky_ganta:/test

test is copied to your Linux home