Home >Operation and Maintenance >Docker >How to put files into docker container
Perfectly copy local files to docker container:
(1) Find the container
docker ps -a
(2) Determine our container name and get the container long ID
docker inspect -f '{{.ID}}' store-dev
(3) Copy local files to the container
docker cp 你的文件路径 容器长ID:docker容器路径
Example:
Assume that the container name is 68b99. Now you need to copy the host/var/backup/nginx.zip file to the /cert path in the container.
Execute the command on the host:
docker cp /var/backup/nginx.zip 68b99:/cert
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 put files into docker container. For more information, please follow other related articles on the PHP Chinese website!