Docker copies files between the host and the container

 

1. Host file to container: docker cp file container ID or container name of the current host: container directory:

docker cp jdk-8u144-linux-x64.tar.gz testUbuntu:/home/kanpiaoxue/develop/jdk/

2. File from container to host:  docker cp container ID or container name:  the file of the current host in the container directory 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326394263&siteId=291194637