Docker の実験（その２：コンテナの調査）

[その1：コンテナの作成](https://qiita.com/intrajp/items/20fc2a72fd5f42cff597)のつづき。

前回作成したコンテナを調査する（funny_wu というのは、コンテナの名前）。

```bash
$ docker container inspect funny_wu　（funny_wu というのは、Docker が自動的につけたコンテナ名）
[
    {
        "Id": "fe8d52bced5e983a1d3e06571653ac363ea8a7aca190667096220b66ee24b527",
        "Created": "2023-02-15T23:04:50.537182754Z",
        "Path": "/docker-entrypoint.sh",
        "Args": [
            "nginx",
            "-g",
            "daemon off;"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 6930,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-02-16T09:20:56.538082526Z",
            "FinishedAt": "2023-02-16T09:15:11.522895649Z"
        },
        "Image": "sha256:3f8a00f137a0d2c8a2163a09901e28e2471999fde4efc2f9570b91f1c30acf94",
        "ResolvConfPath": "/var/lib/docker/containers/fe8d52bced5e983a1d3e06571653ac363ea8a7aca190667096220b66ee24b527/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/fe8d52bced5e983a1d3e06571653ac363ea8a7aca190667096220b66ee24b527/hostname",
        "HostsPath": "/var/lib/docker/containers/fe8d52bced5e983a1d3e06571653ac363ea8a7aca190667096220b66ee24b527/hosts",
        "LogPath": "/var/lib/docker/containers/fe8d52bced5e983a1d3e06571653ac363ea8a7aca190667096220b66ee24b527/fe8d52bced5e983a1d3e06571653ac363ea8a7aca190667096220b66ee24b527-json.log",
        "Name": "/funny_wu",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "tag": "{{.Name}}"
                }
            },
            "NetworkMode": "default",
            "PortBindings": {
                "80/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "80"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "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": null,
            "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": "/var/lib/docker/overlay2/3a43ac8b5812d3404a67a4697219fbd2f6cc651896fdb0b522e41dab81e5b918-init/diff:/var/lib/docker/overlay2/7ef67b89973e5c03e669dcc9f7f966178349d663673f168d364f17fa75ae0c82/diff:/var/lib/docker/overlay2/8a56958f4a506d678f6a925ae55a63b78bb6bebe91734ae7a9f6153d38a76b49/diff:/var/lib/docker/overlay2/a471fa7e575e808bd8182f06a3620fc69387cb919226cdde4d16c4539874df07/diff:/var/lib/docker/overlay2/f1f412f8541f40bdd5cad7692ee79ab9094a2bf35b31a3a856be0382d590d9b7/diff:/var/lib/docker/overlay2/f6f0900d411c7ded30447c1323b25786fec84c88c5efbbb5fd650d5b75633942/diff:/var/lib/docker/overlay2/586bb9d65ad031c2139d4458687b665330c5013f1d267b7bbf042fd257b87d30/diff",
                "MergedDir": "/var/lib/docker/overlay2/3a43ac8b5812d3404a67a4697219fbd2f6cc651896fdb0b522e41dab81e5b918/merged",
                "UpperDir": "/var/lib/docker/overlay2/3a43ac8b5812d3404a67a4697219fbd2f6cc651896fdb0b522e41dab81e5b918/diff",
                "WorkDir": "/var/lib/docker/overlay2/3a43ac8b5812d3404a67a4697219fbd2f6cc651896fdb0b522e41dab81e5b918/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],
        "Config": {
            "Hostname": "fe8d52bced5e",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": true,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.23.3",
                "NJS_VERSION=0.7.9",
                "PKG_RELEASE=1~bullseye"
            ],
            "Cmd": [
                "nginx",
                "-g",
                "daemon off;"
            ],
            "Image": "nginx",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "maintainer": "NGINX Docker Maintainers <docker-maint@nginx.com>"
            },
            "StopSignal": "SIGQUIT"
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "32852a3737fe9b7721bc598f3288a9a69cbe0f7b3ec327668e1070c4d91e6dc7",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "80/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "80"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "80"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/32852a3737fe",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "f8d8de773c2af71c71ee4d408a0d9a5620ee746842adb0a4ce46cdda206529fc",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.2",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:02",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "04e41ae14810eb92050b5761607076043fec0ad50edcf09665f949706fb3cf7b",
                    "EndpointID": "f8d8de773c2af71c71ee4d408a0d9a5620ee746842adb0a4ce46cdda206529fc",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]
```

[その３：ポート番号の設定](https://qiita.com/intrajp/items/096d357c0c3e4d3e6c55)につづく。