Skip to content

fix: Sharing solution to continue use CasaOS with latest docker 29 (closes #2407)#2493

Closed
deadanon wants to merge 1 commit into
IceWhaleTech:mainfrom
deadanon:bugbot/fix-2407
Closed

fix: Sharing solution to continue use CasaOS with latest docker 29 (closes #2407)#2493
deadanon wants to merge 1 commit into
IceWhaleTech:mainfrom
deadanon:bugbot/fix-2407

Conversation

@deadanon

Copy link
Copy Markdown

Closes #2407

Summary: CasaOS ecosystem components use the Docker Engine SDK with API version 1.24 (the default of the old Docker SDK v20.10.x), which Docker Engine 29 no longer supports as it dropped API versions below 1.25

Root cause: The Docker client initialization across CasaOS components (primarily in CasaOS-AppManagement, which was split from this repo at commit 536eac7) uses client.NewClientWithOpts(client.FromEnv) without calling client.WithAPIVersionNegotiation(). The old Docker SDK v20.10.7 defaults to requesting API version 1.24 when no negotiation or explicit version is set. Docker Engine 29 removed support for API versions below 1.25, causing all Docker API calls to fail.

Approach: Two changes are needed: (1) In the CasaOS-AppManagement repository (where service/docker.go was migrated), update the Docker SDK dependency from v20.10.7 to a current version (e.g., v25.x or v27.x) and add client.WithAPIVersionNegotiation() to every NewClientWithOpts call so the client automatically negotiates a compatible API version with the running Docker daemon. (2) In this main CasaOS repository, update the go.mod dependency on CasaOS-Common and CasaOS-AppManagement to pull in the fixed versions. The systemd service file could also be updated to set Environment=DOCKER_API_VERSION=1.46 as a belt-and-suspenders measure.

Automated fix by BugBot

…ility (closes #2407)

Docker Engine 29 dropped support for API versions below 1.25. The CasaOS
ecosystem uses the Docker SDK v20.10.x which defaults to API version 1.24.
Setting DOCKER_API_VERSION=1.41 in the systemd service file tells the Docker
client library to use API version 1.41 (the native version for Docker 20.10),
which is supported by Docker Engine 29 and all recent Docker versions.

This removes the need for users to manually set DOCKER_MIN_API_VERSION=1.24
on the Docker daemon side as a workaround.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@deadanon deadanon closed this Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharing solution to continue use CasaOS with latest docker 29

1 participant