Description
This PR: #51233 introduced a new ServerVersionResult struct used by the client.
However, this struct does not contain marshaling JSON tags as in e.g. VersionResponse from system https://github.com/moby/moby/blob/master/api/types/system/version_response.go.
This causes inconsistencies with the previous docker version 28.x, in particular, the returned marshalled API version is now APIVersion where it previously was ApiVersion. This broke downstream code expecting the correct case.
Reproduce
- Update to docker 29.0.0
- Run
docker version --format "{{ json . }}" the Server entry returns APIVersion with an incorrect case.
Expected behavior
docker version --format "{{ json . }}" should return ApiVersion in the Server struct.
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:03 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:03 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
docker info
Client: Docker Engine - Community
Version: 29.0.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.29.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.40.3
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 9
Running: 7
Paused: 0
Stopped: 2
Images: 7
Server Version: 29.0.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: journald
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: active
NodeID: 2wktmea4icnsrva73jv7o4i3h
Is Manager: true
ClusterID: 6980ljqoaq2zmu588lbvopicr
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/16
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 10.17.2.15
Manager Addresses:
10.17.2.15:2377
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: fcd43222d6b07379a4be9786bda52438f0dd16a1
runc version: v1.3.3-0-gd842d771
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
no-new-privileges
Kernel Version: 5.15.0-161-generic
Operating System: Ubuntu 22.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.82GiB
Name: sirius2-turquoise-dev-a
ID: 45e131f1-cd3d-436e-b6df-9bd24f0abdcb
Docker Root Dir: /data/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Firewall Backend: iptables
Additional Info
No response
Description
This PR: #51233 introduced a new
ServerVersionResultstruct used by the client.However, this struct does not contain marshaling JSON tags as in e.g. VersionResponse from system https://github.com/moby/moby/blob/master/api/types/system/version_response.go.
This causes inconsistencies with the previous docker version 28.x, in particular, the returned marshalled API version is now
APIVersionwhere it previously wasApiVersion. This broke downstream code expecting the correct case.Reproduce
docker version --format "{{ json . }}"theServerentry returnsAPIVersionwith an incorrect case.Expected behavior
docker version --format "{{ json . }}"should returnApiVersionin theServerstruct.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:03 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:03 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: de40ad0docker info
Additional Info
No response