AuxAddress option not working while creating network through Docker API.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am trying to create docker network using docker API. The main purpose is to configure Aux address so not to assign certain IP address to containers.
Expected behavior:
Docker network should be created and on inspecting should have the excluded aux address configured.
Actual behavior:
Aux address are not configured.
Steps to reproduce:
Below was the curl API call have used in creating the network.
curl --unix-socket /var/run/docker.sock -H "Content-Type: application/json" -d '{"Name":"aux-2", "Driver": "bridge", "IPAM": {"Config":[{"Subnet": "192.0.0.0/24", "Gateway": "192.0.0.1", "AuxAddress": "Exclude:192.0.0.2"}] }}' -X POST http:/v1.39/networks/create
By taking official docker API create network reference, above curl call is defined, but Aux address are not configured.
docker network inspect aux-2
[
{
"Name": "aux-2",
"Id": "4dc78b44dd15778846b9b52aeea7c53c37a20a0993b6817048e2b247873147db",
"Created": "2018-11-16T16:56:24.16356905+05:30",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "192.0.0.0/24",
"Gateway": "192.0.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"93103289e29143244ed362c881cdbd0da1d0c87ce2ac3d7eabc302b775835142": {
"Name": "server1",
"EndpointID": "f97cc787dd36ac1a9d901f7274c85d9cef7566ea5a0ffde887bbdbba65bc5f18",
"MacAddress": "02:42:c0:00:00:02",
"IPv4Address": "192.0.0.2/24",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
How to configure Aux addresses in docker API call?
Thanks and Regards,
Mohan
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented v1.39 NetworkCreate request and the curl payload, then compare the returned network inspect output with the requested AuxAddress value. Trace how the API handles IPAM Config and define done as preserving the AuxAddress entry and excluding that address from container assignment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100