-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
kind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.status/0-triage
Description
Description
The recently introduced field GwPriority
is marked in the API docs as a type of "number":
Lines 2909 to 2918 in 8652cf6
GwPriority: | |
description: | | |
This property determines which endpoint will provide the default | |
gateway for a container. The endpoint with the highest priority will | |
be used. If multiple endpoints have the same priority, endpoints are | |
lexicographically sorted based on their network name, and the one | |
that sorts first is picked. | |
type: "number" | |
example: | |
- 10 |
This introduces problems with clients that generate their interfaces with the Docker API, because they will assume this property to be a float. See for example bug 537 in Bollard.
Reproduce
- Execute:
$ curl --unix-socket /var/run/docker.sock -H 'Content-Type: application/json' -X POST -d '{"Image": "alpine", "NetworkingConfig": {"EndpointsConfig": {"eth8": {"GwPriority": 10.0}}}}' 'http://localhost/containers/create'
{"message":"invalid JSON: json: cannot unmarshal number 10.0 into Go struct field EndpointSettings.NetworkingConfig.EndpointsConfig.GwPriority of type int"}
Expected behavior
The API should document the GwPriority
property as a int64
, so that clients can generate the correct interface.
docker version
Client:
Version: 28.3.0
API version: 1.51
Go version: go1.24.4
Git commit: 38b7060a21
Built: Wed Jun 25 15:40:54 2025
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 28.3.0
API version: 1.51 (minimum version 1.24)
Go version: go1.24.4
Git commit: 265f709647
Built: Wed Jun 25 15:40:54 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.1.3
GitCommit: c787fb98911740dd3ff2d0e45ce88cdf01410486.m
runc:
Version: 1.3.0
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Version: 28.3.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.25.0
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: 2.38.1
Path: /usr/lib/docker/cli-plugins/docker-compose
Server:
Containers: 3
Running: 1
Paused: 0
Stopped: 2
Images: 2
Server Version: 28.3.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: true
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
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: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: c787fb98911740dd3ff2d0e45ce88cdf01410486.m
runc version:
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.12.35-1-lts
Operating System: EndeavourOS
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 46.66GiB
Name: beleagueredbeatle
ID: 05941691-5394-4e5a-a073-0dd5377e6aac
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 32
Goroutines: 52
System Time: 2025-07-05T13:50:09.005529867+01:00
EventsListeners: 0
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Additional Info
No response
Metadata
Metadata
Assignees
Labels
kind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.status/0-triage
Type
Projects
Status
Todo