docker:如何查看容器的挂载目录

docker inspect container_name | grep Mounts -A 20
docker inspect container_id | grep Mounts -A 20
[root@localhost lib64]# docker ps
CONTAINER ID IMAGE           COMMAND               CREATED     STATUS     PORTS                                            NAMES
9cb8be23988c jenkins_yto:v1 "/sbin/tini -- /usr/…" 8 weeks ago Up 2 hours 0.0.0.0:50000->50000/tcp, 0.0.0.0:8081->8080/tcp jenkins_docker


[root@localhost lib64]# docker inspect jenkins_docker | grep Mounts -A 20
        "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",
[root@localhost lib64]# docker inspect 9cb8 | grep Mounts -A 20
        "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",
 
   

 

 

 

 

转载于:https://www.cnblogs.com/gcgc/p/10831711.html

你可能感兴趣的:(docker:如何查看容器的挂载目录)