This article is a mirror article of machine translation, please click here to jump to the original article.

View: 7883|Reply: 0

How Docker containers and hosts copy files to each other

[Copy link]
Posted on 9/28/2018 3:50:29 PM | | |
docker cp: Used for copying data between containers and hosts.

grammar
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH

OPTIONS Description:


-L: Keep the link in the source destination

Example

Copy the host./RS-MapReduce directory to the /home/cloudera directory of container 30026605dcfe.
docker cp RS-MapReduce 30026605dcfe:/home/cloudera

Copy the /home/cloudera/RS-MapReduce directory of container 30026605dcfe to the /tmp directory of the host.
docker cp  30026605dcfe:/home/cloudera/RS-MapReduce /tmp/





Previous:Programmer jokes and pictures
Next:How to call the MYSQL class
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com