Docker 如何查看初始参数 挂载信息等

使用docker inspect CONTAINER 进行查看

docker@default:~$ docker inspect 006052dc3767                                      
[
    {
        "Id": "006052dc37672859369943deb60275b87991e74bf8984eff3c37033ae9f7fc20",
        "Created": "2019-10-10T01:24:34.777860033Z",
        "Path": "/container/tool/run",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 10084,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2019-10-10T01:24:35.058124902Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:4c780dfa5f5e85e3c50e500ea3482c5fc70a5c8b5ba8d88de936203da919740b",
        "ResolvConfPath": "/mnt/sda1/var/lib/docker/containers/006052dc37672859369943deb60275b87991e74bf8984eff3c37033ae9f7fc20/resolv.conf",
        "HostnamePath": "/mnt/sda1/var/lib/docker/containers/006052dc37672859369943deb60275b87991e74bf8984eff3c37033ae9f7fc20/hostname",
        "HostsPath": "/mnt/sda1/var/lib/docker/containers/006052dc37672859369943deb60275b87991e74bf8984eff3c37033ae9f7fc20/hosts",
        "LogPath": "/mnt/sda1/var/lib/docker/containers/006052dc37672859369943deb60275b87991e74bf8984eff3c37033ae9f7fc20/006052dc37672859369943deb60275b87991e74bf8984eff3c37033ae9f7fc20-json.log",
        "Name": "/openldap",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": [
            "dd722a8e023ab8caa7b2164525029548216147022520957478e2075cd29d8cf5"
        ],
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {
                "389/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "389"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Capabilities": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/mnt/sda1/var/lib/docker/overlay2/2b6b4c4e76631c948ddfb2e824443e8b5e9e12a3a626872ae1c4def7b15f32b2-init/diff:/mnt/sda1/var/lib/docker/overlay2/e6f86d356b1201e05c5e367686a075a1444e5e0c6d45bd4c08b544873bbde4e0/diff:/mnt/sda1/var/lib/docker/overlay2/2bf5ab8db395eddf83b49af220706d034826e126454f780fa2f2118be2d9c11b/diff:/mnt/sda1/var/lib/docker/overlay2/feb76004d5df767551a918986b1499bdb400b6e781d041fa21f51c51c800929b/diff:/mnt/sda1/var/lib/docker/overlay2/756b19629b6234d0eb3f5787278531abec65c7aa5f0f6a0e4cb490c6541ccbda/diff:/mnt/sda1/var/lib/docker/overlay2/27e49b3dd66b9b025bb2d5f517dfec2dd24babe12183b05797e9192117a008e0/diff:/mnt/sda1/var/lib/docker/overlay2/db1f6f8de8671526bf98b3033bbdc5bf09e7949dfcc61b3904d5e719241aa2f3/diff:/mnt/sda1/var/lib/docker/overlay2/181be0331013e696e36e955faf63d95a46f0b90474f50bdaa202c8d63bcd61f6/diff:/mnt/sda1/var/lib/docker/overlay2/5a1344b430e9b0c41d78354e1c210c27fb958c0904786ee6473eb81131b5dd1a/diff:/mnt/sda1/var/lib/docker/overlay2/6fb09a11547512ad938bfedd293ac02e6e5157118defc160cab1e18d01691a27/diff",
                "MergedDir": "/mnt/sda1/var/lib/docker/overlay2/2b6b4c4e76631c948ddfb2e824443e8b5e9e12a3a626872ae1c4def7b15f32b2/merged",
                "UpperDir": "/mnt/sda1/var/lib/docker/overlay2/2b6b4c4e76631c948ddfb2e824443e8b5e9e12a3a626872ae1c4def7b15f32b2/diff",
                "WorkDir": "/mnt/sda1/var/lib/docker/overlay2/2b6b4c4e76631c948ddfb2e824443e8b5e9e12a3a626872ae1c4def7b15f32b2/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "006052dc3767",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "389/tcp": {},
                "636/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "LDAP_ORGANISATION=somalltest",
                "LDAP_DOMAIN=somalltest.com",
                "LDAP_ADMIN_PASSWORD=pass",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=en_US.UTF-8",
                "LANGUAGE=en_US:en",
                "LC_ALL=en_US.UTF-8"
            ],
            "Cmd": null,
            "Image": "osixia/openldap",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/container/tool/run"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "468ac6cebca6c73e2c73c61b62a645d1f3fd3aace5c02ff184f9066cae7e3331",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "389/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "389"
                    }
                ],
                "636/tcp": null
            },
            "SandboxKey": "/var/run/docker/netns/468ac6cebca6",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "d95021758ecd8875c684e34f669497ddd90d9d7493fbacc5d21da0bab89fb5d4",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.3",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:03",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "c71f88b16ca883ce4a018dad717e1635e3b399919bf9cec64c9bab7c8707e46a",
                    "EndpointID": "d95021758ecd8875c684e34f669497ddd90d9d7493fbacc5d21da0bab89fb5d4",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.3",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:03",
                    "DriverOpts": null
                }
            }
        }
    }
]


你可能感兴趣的:(技术专栏#,Docker技术)