Home>Article>Operation and Maintenance> How to check the path of the mapped docker container

How to check the path of the mapped docker container

angryTom
angryTom Original
2020-03-16 18:12:23 12046browse

How to check the path of the mapped docker container

How to check the path of the mapped docker container

Use the following command. container_name is the name of the container, you can also write the ID of the container.

$ docker inspect container_name | grep Mounts -A 20

Output example:

"Mounts": [ { "Type": "bind", "Source": "/usr/bin/docker", "Destination": "/usr/bin/docker", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Type": "bind", "Source": "/usr/lib64/libltdl.so.7", "Destination": "/usr/lib/x86_64-linux-gnu/libltdl.so.7", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Type": "bind", "Source": "/var/jenkins_home", "Destination": "/var/jenkins_home",

Note: You can use the docker ps -a command to obtain the container ID

Output example:

CONTAINER ID IMAGE COMMAND ... PORTS NAMES 09b93464c2f7 nginx:latest "nginx -g 'daemon off" ... 80/tcp, 443/tcp myrunoob 96f7f14e99ab mysql:5.6 "docker-entrypoint.sh" ... 0.0.0.0:3306->3306/tcp mymysql

More related tutorials, Please pay attention to thedocker tutorialcolumn on the PHP Chinese website.

The above is the detailed content of How to check the path of the mapped docker container. 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