Copy Files to BC Docker images

jordi79jordi79 Member Posts: 275
Hi,
I have created BC docker and it all works.
How do I copy files from local host to docker?

In this blog --> https://simplanova.com/blog/how-to-start-using-dynamics-365-business-central-docker/
there are detailed steps on how to do this. It says that I have to stop the container to copy files using "Docker CP" command.
But if I stop docker, then I cannot see the container in the "Docker CP" command.

E.g.
When I try to run "DOCKER CP" on a running docker I get the error -->
PS C:\Windows\system32> docker cp c:\temp\temp.txt mysandbox:/c:/temp/temp.txt
docker : Error response from daemon: filesystem operations against a running Hyper-V container are not supported
At line:1 char:1
+ docker cp c:\temp\temp.txt mysandbox:/c:/temp/temp.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Error response ...e not supported:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

When I stop the Container, and run "DOCKER CP", then I get the error -->
PS C:\Windows\system32> docker cp c:\temp\temp.txt mysandbox:/c:/temp/temp.txt
docker : Error: No such container:path: mysandbox:\c:\temp
At line:1 char:1
+ docker cp c:\temp\temp.txt mysandbox:/c:/temp/temp.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Error: No such ...andbox:\c:\temp:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

Answers

Sign In or Register to comment.