1
0
mirror of https://github.com/containers/podman.git synced 2026-02-05 06:45:31 +01:00
Files
podman/version/version.go
Anders F Björklund c9e20280ed Bump Compat API version to supported v1.44
All API versions before version 1.44 are now deprecated,
starting with Docker client version 1.29 giving an error:

"API version 1.41 is not supported by this client"

Previously it was backward-compatible for more than 10 years,
with version 1.24 being the version in classic Docker 1.12.

It seems like API code changes were already added?

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2026-01-17 09:56:18 +01:00

47 lines
1.2 KiB
Go

package version
import (
"github.com/blang/semver/v4"
"github.com/containers/podman/v6/version/rawversion"
)
type (
// Tree determines which API endpoint tree for version
Tree int
// Level determines which API level, current or something from the past
Level int
)
const (
// Libpod supports Libpod endpoints
Libpod = Tree(iota)
// Compat supports Libpod endpoints
Compat
// CurrentAPI announces what is the current API level
CurrentAPI = Level(iota)
// MinimalAPI announces what is the oldest API level supported
MinimalAPI
)
// Version is the version of the build.
var Version = semver.MustParse(rawversion.RawVersion)
// See https://docs.docker.com/reference/api/engine/
// libpod compat handlers are expected to honor docker API versions
// APIVersion provides the current and minimal API versions for compat and libpod endpoint trees
// Note: GET|HEAD /_ping is never versioned and provides the API-Version and Libpod-API-Version headers to allow
//
// clients to shop for the Version they wish to support
var APIVersion = map[Tree]map[Level]semver.Version{
Libpod: {
CurrentAPI: Version,
MinimalAPI: semver.MustParse("4.0.0"),
},
Compat: {
CurrentAPI: semver.MustParse("1.44.0"),
MinimalAPI: semver.MustParse("1.24.0"),
},
}