docker cp : Used to copy data between the container and the host. OPTIONS description: -L : Maintain links in the source destination Copy the host / www/runoob directory to the / www directory of the container 96f7f14e99ab. Copy the host / www/runoob directory into the container 96f7f14e99ab and rename the directory to www. Copy the / www directory of the container 96f7f14e99ab to the / tmp directory of the host. 2.47.1. Grammar ¶
docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-
docker cp [OPTIONS] SRC_PATH|- CONTAINER:DEST_PATH
2.47.2. Example ¶
docker cp /www/runoob 96f7f14e99ab:/www/
docker cp /www/runoob 96f7f14e99ab:/www
docker cp 96f7f14e99ab:/www /tmp/