Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

copy file from host to docker container

docker cp foo.txt mycontainer:/foo.txt
Comment

copy file to docker container

docker cp foo.txt mycontainer:/foo.txt
Comment

copy a file from local machine to docker container

docker cp <Path in the local machine> <Container ID>:<Path of file inside the container>
Comment

Docker: Copying files from Docker container to host

for copy file from a container to the host use the command
docker cp <containerId>:/file/path/within/container /host/path/target

You can also use (part of) the Container ID. The following command is equivalent to the first
sudo docker cp 1b4a:/out_read.jpg .


Comment

PREVIOUS NEXT
Code Example
Shell :: git setup upstream 
Shell :: merge master into branch 
Shell :: Delete non empty folder 
Shell :: zsh deno command not found 
Shell :: awk print only range of lines 
Shell :: meld between two branches 
Shell :: ubuntu networkManager change dns 
Shell :: how to create tls.crt and tls.key 
Shell :: /etc/apt/sources.list 
Shell :: awk delimiter semi-colon 
Shell :: unzip mac terminal 
Shell :: move files terminal 
Shell :: bash provide path to same dir as executable 
Shell :: bash for tuple 
Shell :: ubuntu 16 lock from terminal 
Shell :: how to change branch name 
Shell :: docker compose busybox image 
Shell :: how to kill looped process by command name 
Shell :: vim delete duplicate lines 
Shell :: wsl install portainer 
Shell :: install tailwind using yarn 
Shell :: linux cat with syntax highlighting 
Shell :: libodbc1 2.3.7 ubuntu 
Shell :: how to remove git config property 
Shell :: regex start word 
Shell :: install docker compose on centos 
Shell :: install specific gitlab version on ubuntu 
Shell :: get file until match without including 
Shell :: how to create a new branch 
Shell :: openvpn client docker 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =