Docker add file from windows host into container
On my windows machin, I can’t share volume with docker container because of my firewall.
So, what I’ve done is creating my container :
1 |
docker run -d -p 49160:22 -p 49161:1521 -e ORACLE_ALLOW_REMOTE=true wnameless/oracle-xe-11g |
Once it’s started, I get the container ID :
1 2 3 4 |
C:\Users\mdurand> docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c47345008fda wnameless/oracle-xe-11g "/bin/sh -c '/usr/..." 2 seconds ago Up 1 second 8080/tcp, |
Then, just copy the file by using : docker cp <file> <containerID>:<containerPATH>
1 |
docker cp D:/morgan/documents/blabla c47345008fda:/data |