Skip to content

Conversation

@thaJeztah
Copy link
Member

The daemon currently provides support for API versions all the way back to v1.24, which is the version of the API that shipped with docker 1.12.0 (released in 2016).

Such old versions of the client are rare, and supporting older API versions has accumulated significant amounts of code to remain backward-compatible (which is largely untested, and a "best-effort" at most).

This patch updates the minimum API version to v1.44, matching the minimum version of the client, and matching the API version of docker v25.0, which is the oldest supported version (through Mirantis MCR).

The intent is to start deprecating older API versions when daemons implementing them reach EOL. This patch does not yet remove backward-compatibility code for older API versions, and the DOCKER_MIN_API_VERSION environment variable allows overriding the minimum version (to allow restoring the behavior from before this patch), however, API versions below v1.44 should be considered "best effort", and we may remove compatibility code to provide "degraded" support.

With this patch the daemon defaults to API v1.44 as minimum:

docker version
Client:
 Version:           28.5.0
 API version:       1.51
 Go version:        go1.24.7
 Git commit:        887030f
 Built:             Thu Oct  2 14:54:39 2025
 OS/Arch:           linux/arm64
 Context:           default

Server:
 Engine:
  Version:          dev
  API version:      1.52 (minimum version 1.44)
....

Trying to use an older version of the API produces an error:

DOCKER_API_VERSION=1.43 docker version
Client:
 Version:           28.5.0
 API version:       1.43 (downgraded from 1.51)
 Go version:        go1.24.7
 Git commit:        887030f
 Built:             Thu Oct  2 14:54:39 2025
 OS/Arch:           linux/arm64
 Context:           default
Error response from daemon: client version 1.43 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version

To restore the previous minimum, users can start the daemon with the DOCKER_MIN_API_VERSION environment variable set:

DOCKER_MIN_API_VERSION=1.24 dockerd

API 1.24 is the oldest supported API version;

docker version
Client:
 Version:           28.5.0
 API version:       1.24 (downgraded from 1.51)
 Go version:        go1.24.7
 Git commit:        887030f
 Built:             Thu Oct  2 14:54:39 2025
 OS/Arch:           linux/arm64
 Context:           default

Server:
 Engine:
  Version:          dev
  API version:      1.52 (minimum version 1.24)
....

When using the DOCKER_MIN_API_VERSION with a version of the API that is not supported, an error is produced when starting the daemon;

DOCKER_MIN_API_VERSION=1.23 dockerd --validate
invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: 1.23

DOCKER_MIN_API_VERSION=1.99 dockerd --validate
invalid DOCKER_MIN_API_VERSION: maximum supported API version is 1.52: 1.99

Specifying a malformed API version also produces the same error;

DOCKER_MIN_API_VERSION=hello dockerd --validate
invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: hello

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

daemon: raise default minimum API version to v1.44

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah thaJeztah added this to the 29.0.0 milestone Oct 14, 2025
@github-actions github-actions bot added the area/daemon Core Engine label Oct 14, 2025
@thaJeztah thaJeztah added the kind/refactor PR's that refactor, or clean-up code label Oct 14, 2025
@thaJeztah thaJeztah force-pushed the deprecate_api_v1.43 branch 3 times, most recently from acece09 to f2e8595 Compare October 14, 2025 17:51
@github-actions github-actions bot added the area/networking Networking label Oct 14, 2025
@thaJeztah thaJeztah force-pushed the deprecate_api_v1.43 branch from f2e8595 to c4bc9a5 Compare October 14, 2025 20:11
@github-actions github-actions bot added the area/images Image Distribution label Oct 14, 2025
@thaJeztah thaJeztah force-pushed the deprecate_api_v1.43 branch from c4bc9a5 to e0a4452 Compare October 14, 2025 21:08
@thaJeztah thaJeztah force-pushed the deprecate_api_v1.43 branch from e0a4452 to 26ef63e Compare October 14, 2025 21:39
- relates to 96b29f5
- similar to 08e4e88

The daemon currently provides support for API versions all the way back
to v1.24, which is the version of the API that shipped with docker 1.12.0
(released in 2016).

Such old versions of the client are rare, and supporting older API versions
has accumulated significant amounts of code to remain backward-compatible
(which is largely untested, and a "best-effort" at most).

This patch updates the minimum API version to v1.44, matching the minimum
version of the client, and matching the API version of docker v25.0, which
is the oldest supported version (through Mirantis MCR).

The intent is to start deprecating older API versions when daemons implementing
them reach EOL. This patch does not yet remove backward-compatibility code
for older API versions, and the DOCKER_MIN_API_VERSION environment variable
allows overriding the minimum version (to allow restoring the behavior from
before this patch), however, API versions below v1.44 should be considered
"best effort", and we may remove compatibility code to provide "degraded"
support.

With this patch the daemon defaults to API v1.44 as minimum:

    docker version
    Client:
     Version:           28.5.0
     API version:       1.51
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.52 (minimum version 1.44)
    ....

Trying to use an older version of the API produces an error:

    DOCKER_API_VERSION=1.43 docker version
    Client:
     Version:           28.5.0
     API version:       1.43 (downgraded from 1.51)
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default
    Error response from daemon: client version 1.43 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version

To restore the previous minimum, users can start the daemon with the
DOCKER_MIN_API_VERSION environment variable set:

    DOCKER_MIN_API_VERSION=1.24 dockerd

API 1.24 is the oldest supported API version;

    docker version
    Client:
     Version:           28.5.0
     API version:       1.24 (downgraded from 1.51)
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.52 (minimum version 1.24)
    ....

When using the `DOCKER_MIN_API_VERSION` with a version of the API that
is not supported, an error is produced when starting the daemon;

    DOCKER_MIN_API_VERSION=1.23 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: 1.23

    DOCKER_MIN_API_VERSION=1.99 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: maximum supported API version is 1.52: 1.99

Specifying a malformed API version also produces the same error;

    DOCKER_MIN_API_VERSION=hello dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: hello

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the deprecate_api_v1.43 branch from 26ef63e to 2c59be7 Compare October 14, 2025 21:42
@thaJeztah thaJeztah marked this pull request as ready for review October 14, 2025 22:51
@thaJeztah thaJeztah requested a review from tianon as a code owner October 14, 2025 22:51
@thaJeztah thaJeztah added the release-blocker PRs we want to block a release on label Oct 16, 2025
Copy link
Member

@akerouanton akerouanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think we should mention in the release notes when we're planning to drop support for these older API versions such that affected users can anticipate.

Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is reasonable expectation of the API support.

@thompson-shaun
Copy link
Contributor

Let's make a docs issue to support this @vvoland @austinvazquez ❤️

@thaJeztah
Copy link
Member Author

thaJeztah commented Oct 16, 2025

Also to look for mainstream projects that need an update (good catch, @vvoland); we can contribute a patch for traefik at least; possibly could use version-negotiation as weell, but at least update to v1.44; I think I also saw a separate Swarm version const, so also need to look at that;
https://github.com/traefik/traefik/blob/05de0670ea9fe4c66e6abeb8868acfcff3b9b4b7/pkg/provider/docker/pdocker.go#L24-L25
https://github.com/traefik/traefik/blob/05de0670ea9fe4c66e6abeb8868acfcff3b9b4b7/pkg/provider/docker/shared.go#L111-L129

☝️ this should give a starting-point; https://grep.app/search?f.lang=Go&q=client.WithVersion%28

@thaJeztah
Copy link
Member Author

I'll bring this one in; we can have follow-ups where needed 👍

@thaJeztah thaJeztah merged commit c5abafb into moby:master Oct 16, 2025
260 of 261 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants