E47B /images/{name}/json does not return image Entrypoint if null · Issue #50134 · moby/moby · GitHub
[go: up one dir, main page]

Skip to content

/images/{name}/json does not return image Entrypoint if null #50134

@theCapypara

Description

@theCapypara

Description

Since at least Docker 28.2.2, the API response of /images/{name}/json and as such the output of docker inspect no longer contains the image entrypoint if it is null under Config.Entrypoint. Some tools may rely on this, and it is not documented that this field can be missing, see https://docs.docker.com/reference/api/engine/version/v1.50/#tag/Image/operation/ImageInspect
There was also nothing in the changelog about this.

It also doesn't document that it can be null, even if it can be, but that was the case even before this update.

My guess is this is an unintended side effect of the removal of other unrelated API fields in the last API update.

Compare the output of docker inspect alpine:

v 28.2.2:

[
    {
        "Id": "sha256:cea2ff433c610f5363017404ce989632e12b953114fefc6f597a58e813c15d61",
        "RepoTags": [
            "alpine:latest"
        ],
        "RepoDigests": [
            "alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2025-05-30T16:20:41Z",
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh"
            ],
            "WorkingDir": "/"
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 8309109,
        "GraphDriver": {
            "Data": {
                "MergedDir": "/var/lib/docker/overlay2/0e810d6ad7dbaa82bf96ea24ee029317f8c0fe7f0c85200f023c56a38d0b62a0/merged",
                "UpperDir": "/var/lib/docker/overlay2/0e810d6ad7dbaa82bf96ea24ee029317f8c0fe7f0c85200f023c56a38d0b62a0/diff",
                "WorkDir": "/var/lib/docker/overlay2/0e810d6ad7dbaa82bf96ea24ee029317f8c0fe7f0c85200f023c56a38d0b62a0/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:fd2758d7a50e2b78d275ee7d1c218489f2439084449d895fa17eede6c61ab2c4"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

v 27.5.1:

[
    {
        "Id": "sha256:cea2ff433c610f5363017404ce989632e12b953114fefc6f597a58e813c15d61",
        "RepoTags": [
            "alpine:latest"
        ],
        "RepoDigests": [
            "alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2025-05-30T16:20:41Z",
        "DockerVersion": "",
        "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/sh"
            ],
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 8309109,
        "GraphDriver": {
            "Data": {
                "MergedDir": "/var/lib/docker/overlay2/7f9290058d9027eceb0a259442c0ba86e84e8af7228581a6eaa8bdeb3e21938e/merged",
                "UpperDir": "/var/lib/docker/overlay2/7f9290058d9027eceb0a259442c0ba86e84e8af7228581a6eaa8bdeb3e21938e/diff",
                "WorkDir": "/var/lib/docker/overlay2/7f9290058d9027eceb0a259442c0ba86e84e8af7228581a6eaa8bdeb3e21938e/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:fd2758d7a50e2b78d275ee7d1c218489f2439084449d895fa17eede6c61ab2c4"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

Reproduce

  1. docker pull alpine
  2. docker inspect alpine

Expected behavior

The response should list Entrypoint under Config.

docker version

Client: Docker Engine - Community
 Version:           28.2.2
 API version:       1.50
 Go version:        go1.24.3
 Git commit:        e6534b4
 Built:             Fri May 30 12:09:03 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.2.2
  API version:      1.50 (minimum version 1.24)
  Go version:       go1.24.3
  Git commit:       45873be
  Built:            Fri May 30 12:07:24 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.27
  GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
 runc:
  Version:          1.2.5
  GitCommit:        v1.2.5-0-g59923ef
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:    28.2.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.24.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.36.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 28.2.2
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.11.11-300.fc41.x86_64
 Operating System: Fedora Linux 41 (Workstation Edition)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.747GiB
 Name: fedora.fritz.box
 ID: 71d302ed-8770-4a6a-bccb-7a46ecece0de
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0