Docker Community Forums

Share and learn in the Docker community.

Copy things to mount drive

hello,

What I try to achieve is very simple, create R drive in windows based image, then copy things to it.

ATTEMPT 1:
R:>docker build --tag=myteam/some_apps:version1.0.0 . --build-arg hostip=10.13.247.12
Sending build context to Docker daemon 337.8MB
Step 1/40 : FROM mcr.microsoft.com/dotnet/core/runtime:2.1
—> 63ccc9aeb7f1
Step 2/40 : VOLUME R:\Apps
—> Using cache
—> 6eb44e6f3ecc
Step 3/40 : VOLUME R:\Data
—> Using cache
—> b39d1b2f6325
Step 4/40 : COPY .\Apps R:\Apps
invalid COPY: Windows does not support destinations not on the system drive (C:)

ATTEMPT 2: I tried a different approach, but no joy:
R:>docker build --tag=myteam/some_apps:version1.0.0 . --build-arg hostip=10.13.247.12
Sending build context to Docker daemon 337.8MB
Step 1/41 : FROM mcr.microsoft.com/dotnet/core/runtime:2.1
—> 63ccc9aeb7f1
Step 2/41 : RUN mkdir “C:\Apps”
—> Running in c62cb0e46e7d
Removing intermediate container c62cb0e46e7d
—> a0967376d99f
Step 3/41 : COPY . .
—> d132bac8bf47
Step 4/41 : VOLUME R:\Apps
—> Running in 5177d78beb72
Removing intermediate container 5177d78beb72
—> 83a27df9d828
Step 5/41 : RUN copy C:\Apps R:\Apps
—> Running in 720713ea754d
container 720713ea754d223e39237053b5aa9222ae2d0da19bd251a3398e438bd6d26f29 encountered an error during Start: failure in a Windows system call: The virtual machine or container exited unexpectedly. (0xc0370106)

R:>