Docker 이미지 상제 정보 확인 - image inspect

Docker image inspect

다운로드한 Docker Image를 상제 정보는 아래 명령어를 통해 확인할 수 있습니다.

dongdonge@dongdonge$ sudo docker image inspect ubuntu:16.04

[
    {
        "Id": "sha256:2a697363a8709093834e852b26bedb1d85b316c613120720fea9524f0e98e4a2",
        "RepoTags": [
            "ubuntu:16.04"
        ],
        "RepoDigests": [
            "ubuntu@sha256:cad5e101ab30bb7f7698b277dd49090f520fe063335643990ce8fbd15ff920ef"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2019-05-15T21:21:24.995514303Z",
        "Container": "daa415cd5bb9699484bc6c968efe2a61e2c3fb73ff8d9ac5f61b316ff4b7ab71",
        "ContainerConfig": {
            "Hostname": "daa415cd5bb9",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "CMD [\"/bin/bash\"]"
            ],
            "ArgsEscaped": true,
            "Image": "sha256:cb74ca359c871fd1bc7b3a53394ed1ec7d3082ffac0973e53ca0e7d7af15d3ed",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {}
        },
        "DockerVersion": "18.06.1-ce",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/bash"
            ],
            "ArgsEscaped": true,
            "Image": "sha256:cb74ca359c871fd1bc7b3a53394ed1ec7d3082ffac0973e53ca0e7d7af15d3ed",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 118854786,
        "VirtualSize": 118854786,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/d559a53d9d0292a95f1d2c5d70e08bba0a54077e2cdf5ce94e11e9150ae0dc84/diff:/var/lib/docker/overlay2/3c0829b5b3aa49f3c894ad69a2728bca1ee6481565c6864b81f27a47fb42c263/diff:/var/lib/docker/overlay2/39871b3e06527c6e1faf59d29688ac4b95f7e23b9f6b4a1fe71f2cdc1e6acb23/diff",
                "MergedDir": "/var/lib/docker/overlay2/96baf3d583e6073295f02d5abc91f32c1e3c96a5a40651ef5009534bad72d01f/merged",
                "UpperDir": "/var/lib/docker/overlay2/96baf3d583e6073295f02d5abc91f32c1e3c96a5a40651ef5009534bad72d01f/diff",
                "WorkDir": "/var/lib/docker/overlay2/96baf3d583e6073295f02d5abc91f32c1e3c96a5a40651ef5009534bad72d01f/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:739482a9723dbee6dbdad6b669090e96d5f57e2aa27c131015cce8969d0d4efa",
                "sha256:e15278fccccab1f49ca48ed430acc3859d7a072a5cf1ca6491898ebc1035ec05",
                "sha256:49652298c7790339b0d8f9ec4dd4692ace5edb1fba4aa6d8703d4c1943d43246",
                "sha256:4c54072a50349809bcd1e8d196112308935a6cb41a6b3eff007a7a7a2a1d38f5"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

해당 명령어를 통해 이미지의 상세 정보를 확인할 수 있다. 주요 내용을 보면 레포지토리의 태그 버전 및 Hash 정보와 생성 날짜 Docker 버전 및 CPU 아키텍처 정보를 확인할 수 있다.