使用以下命令: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",

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐