Skip to content

Commit 19a04ef

Browse files
committed
api: remove API < v1.24
Commit 08e4e88 (Docker Engine v25.0.0) deprecated API version v1.23 and lower, but older API versions could be enabled through the DOCKER_MIN_API_VERSION environment variable. This patch removes all support for API versions < v1.24. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 8758d08 commit 19a04ef

4 files changed

Lines changed: 4 additions & 17 deletions

File tree

daemon/config/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const (
5656
DefaultPluginNamespace = "plugins.moby"
5757
// defaultMinAPIVersion is the minimum API version supported by the API.
5858
// This version can be overridden through the "DOCKER_MIN_API_VERSION"
59-
// environment variable. The minimum allowed version is determined
60-
// by [minAPIVersion].
59+
// environment variable. It currently defaults to the minimum API version
60+
// supported by the API server.
6161
defaultMinAPIVersion = "1.24"
6262
// SeccompProfileDefault is the built-in default seccomp profile.
6363
SeccompProfileDefault = "builtin"
@@ -610,8 +610,8 @@ func ValidateMinAPIVersion(ver string) error {
610610
if strings.EqualFold(ver[0:1], "v") {
611611
return errors.New(`API version must be provided without "v" prefix`)
612612
}
613-
if versions.LessThan(ver, minAPIVersion) {
614-
return errors.Errorf(`minimum supported API version is %s: %s`, minAPIVersion, ver)
613+
if versions.LessThan(ver, defaultMinAPIVersion) {
614+
return errors.Errorf(`minimum supported API version is %s: %s`, defaultMinAPIVersion, ver)
615615
}
616616
if versions.GreaterThan(ver, api.DefaultVersion) {
617617
return errors.Errorf(`maximum supported API version is %s: %s`, api.DefaultVersion, ver)

daemon/config/config_linux.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ const (
3333
// OCI runtime being shipped with the docker daemon package.
3434
StockRuntimeName = "runc"
3535

36-
// minAPIVersion represents Minimum REST API version supported
37-
minAPIVersion = "1.12"
38-
3936
// userlandProxyBinary is the name of the userland-proxy binary.
4037
// In rootless-mode, [rootless.RootlessKitDockerProxyBinary] is used instead.
4138
userlandProxyBinary = "docker-proxy"

daemon/config/config_windows.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ const (
1313
// default value. On Windows keep this empty so the value is auto-detected
1414
// based on other options.
1515
StockRuntimeName = ""
16-
17-
// minAPIVersion represents Minimum REST API version supported
18-
// Technically the first daemon API version released on Windows is v1.25 in
19-
// engine version 1.13. However, some clients are explicitly using downlevel
20-
// APIs (e.g. docker-compose v2.1 file format) and that is just too restrictive.
21-
// Hence also allowing 1.24 on Windows.
22-
minAPIVersion string = "1.24"
2316
)
2417

2518
// BridgeConfig is meant to store all the parameters for both the bridge driver and the default bridge network. On

hack/make/.integration-daemon-start

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ export DOCKER_ALLOW_SCHEMA1_PUSH_DONOTUSE=1
4646
export DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-vfs}
4747
export DOCKER_USERLANDPROXY=${DOCKER_USERLANDPROXY:-true}
4848

49-
# Allow testing old API versions
50-
export DOCKER_MIN_API_VERSION=1.12
51-
5249
# example usage: DOCKER_STORAGE_OPTS="dm.basesize=20G,dm.loopdatasize=200G"
5350
storage_params=""
5451
if [ -n "$DOCKER_STORAGE_OPTS" ]; then

0 commit comments

Comments
 (0)