Skip to content

Fix: Docker API version incompatibility #18

@richardoriginal

Description

@richardoriginal

The (awesome) tool is not working with Docker API versions >=1.44, and my changes fix this issue.

As can be seen below, the latest Docker version has a minimum API version, 1.44. Sadtimes. API version 1.44 and higher uses the latest OCI spec, which Whaler cannot deal with, i.e. the Docker Image Manifest V2 (Schema 2) format, https://distribution.github.io/distribution/spec/manifest-v2-2/. Whaler is hard-coded to parse the specific JSON layout of that old format. Docker has long since adopted the OCI (Open Container Initiative) Image Specification. Newer Docker versions and build systems (like BuildKit) create images using the standardized OCI Image Manifest V1 format by default, https://specs.opencontainers.org/image-spec/manifest/.

Natural API version attempt:

$ docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock:ro pegleg/whaler nginx:latest
Error response from daemon: client version 1.41 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version

Forced API version attempt:

$ docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock:ro pegleg/whaler -sV=1.36 nginx:latest
Error response from daemon: client version 1.36 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version

New API version attempt ("unable to parse history from json file"):

$ docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock:ro pegleg/whaler -sV=1.44 nginx:latest
latest: Pulling from library/nginx
<<< CUT FOR BREVITY >>>
Open Ports
|80

Image user
|User is root

Potential secrets:
unable to parse history from json file

Docker version in use:

$ docker version
Client: Docker Engine - Community
 Version:           29.0.0
 API version:       1.52
 Go version:        go1.25.4
 Git commit:        3d4129b
 Built:             Mon Nov 10 21:46:28 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.0.0
  API version:      1.52 (minimum version 1.44)
  Go version:       go1.25.4
  Git commit:       d105562
  Built:            Mon Nov 10 21:46:28 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.1.5
  GitCommit:        fcd43222d6b07379a4be9786bda52438f0dd16a1
 runc:
  Version:          1.3.3
  GitCommit:        v1.3.3-0-gd842d771
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Fix extract:

Looking for history in OCI config files...
Found history in 3125eb08f899e395de6a45e482f7d97c895a0efe177de5a169c624bf55f7767f
OCI format detected:
Found 7 history entries (3 non-empty)
Found 7 layer files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions