Home  >  Article  >  Operation and Maintenance  >  How to copy host files to docker

How to copy host files to docker

尚
Original
2020-03-30 13:59:074332browse

How to copy host files to docker

Copy files from the host to the container:

Execute the following command in the host

docker cp 要拷贝的文件路径 容器名:要拷贝到容器里面对应的路径

Example

Change the host The /www/runoob directory is copied to the /www directory of the container 96f7f14e99ab.

docker cp /www/runoob 96f7f14e99ab:/www/

For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.

The above is the detailed content of How to copy host files to docker. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn