Docker 查看容器映射路径

使用以下命令:container_name 是容器的名字,也可以写容器的ID。

$ docker inspect container_name | grep Mounts -A 20

查询结果:

[root@localhost /]# docker inspect d2a6a115a42b | grep Mounts -A 20
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/work/mysql/conf",
                "Destination": "/etc/mysql/conf.d",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/work/mysql/logs",
                "Destination": "/logs",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/work/mysql/data",
                "Destination": "/var/lib/mysql",

 

你可能感兴趣的:(docker,linux)