Add example to docker image inspect documentation

オープン
#16,316 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker
領域
documentation

調査の方向性

現在の docker image inspect ドキュメントから始め、docker image inspect nginx を実行して出力例を確認します。各フィールドを OCI Image Specification および Docker run reference と比較し、特に StdInOnce などのエントリを確認します。ドキュメントに、ユーザーが出力エントリを解釈できるよう、それらを十分に定義した説明付きの例が含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

area/api area/engine lifecycle/frozen

The docker image inspect command shows a lot useful information on a Docker image. However, I am missing an explained example on what all the entries shown in the response actually mean. The current documentation makes no statement about this. I could also not find a single reference outside Docker docs. Some information can be inferred from the OCI Image Specification, others from the Docker run reference. But not all entries are explained sufficiently.

I created this issue as generalization of issue #16315

As an example, pull the latest nginx image and execute docker image inspect nginx, you will get this output:

[
    {
        "Id": "sha256:ac8efec875ce36b619cb41f91d9db579487b9d45ed29393dc957a745b1e0024f",
        "RepoTags": [
            "nginx:1.23.2",
            "nginx:latest"
        ],
        "RepoDigests": [
            "nginx@sha256:ab589a3c466e347b1c0573be23356676df90cd7ce2dbf6ec332a5f0a8b5e59db"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2022-12-06T04:46:58.320356931Z",
        "Container": "3171a476b89e47a3d602688a3d1ada78b93cc52caf218265481d9c91ca5ebcdf",
        "ContainerConfig": {
            "Hostname": "3171a476b89e",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.23.2",
                "NJS_VERSION=0.7.7",
                "PKG_RELEASE=1~bullseye"
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "CMD [\"nginx\" \"-g\" \"daemon off;\"]"
            ],
            "Image": "sha256:19d855ece39b9e1bf1a9126ed89c7931f8505a2f4e5893f3c72d9b8b310b671f",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "maintainer": "NGINX Docker Maintainers <[email protected]>"
            },
            "StopSignal": "SIGQUIT"
        },
        "DockerVersion": "20.10.12",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NGINX_VERSION=1.23.2",
                "NJS_VERSION=0.7.7",
                "PKG_RELEASE=1~bullseye"
            ],
            "Cmd": [
                "nginx",
                "-g",
                "daemon off;"
            ],
            "Image": "sha256:19d855ece39b9e1bf1a9126ed89c7931f8505a2f4e5893f3c72d9b8b310b671f",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "maintainer": "NGINX Docker Maintainers <[email protected]>"
            },
            "StopSignal": "SIGQUIT"
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 141767578,
        "VirtualSize": 141767578,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/872573049e3bf097fad7dee192afe78bb2c42524eb429602ae088c453652d4b2/diff:/var/lib/docker/overlay2/b08669580851d90170f32fe614a7f1c0ce1e0045eff1c2318ab55fdc5a05c34f/diff:/var/lib/docker/overlay2/47cac3f836efd18d9110de151f0a2badeb74e804313b932a18b68a03a4faf549/diff:/var/lib/docker/overlay2/63900275913ee385755ebf0115d152dc0192c49b5c5f5a910ae2c6d0f4a35803/diff:/var/lib/docker/overlay2/42a97c895a2607143d490cc67fab2c203c5b424ec98d7644c87052abf0710b32/diff",
                "MergedDir": "/var/lib/docker/overlay2/ac6162282cab60993f833557a2ec9ae20842015ec30c5c79ad95ae99dd5dcdf1/merged",
                "UpperDir": "/var/lib/docker/overlay2/ac6162282cab60993f833557a2ec9ae20842015ec30c5c79ad95ae99dd5dcdf1/diff",
                "WorkDir": "/var/lib/docker/overlay2/ac6162282cab60993f833557a2ec9ae20842015ec30c5c79ad95ae99dd5dcdf1/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:b5ebffba54d3e3f7fd80435fcdc34c4a96fdb2ecab0f0a298fe08f74c2f69d29",
                "sha256:2842e5d66803d5141f310218e017d24983fa8c05936c12471ba8f87451720035",
                "sha256:f88642d922a1d9af61581afab6afa968e139763f003c047ae0a7bd3b40f00392",
                "sha256:6906edffc609cbf0ddcde6528af25a4b6c187c219af4e484363bb392849a89a2",
                "sha256:aa3739f310f5e93f7519ce69e7248fd3bba426b9e7ad730d623bda63b45e8802",
                "sha256:7b72d5d921cb3acfc32df62534c75e4dbe7a14c98297c6657ae82b78ce608669"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Here, as an example, it is unclear to me what exactly StdInOnce means. Others are obviously self-explaining, however, I would suggest that an exemplary interpretation on what these entries mean, would help a lot.

主要言語
Markdown
スター
4.7k
フォーク
8.5k
平均マージ
2日 11時間
マージ済み PR(30日)
135

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

docker/docs のほかの issue

docker/docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。