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://blog.csdn.net/qq_33240556/article/details/120204705
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞