v1
latestSwagger 2.02026-07-17107109407.9 KBNetwork
Connect a container to a network
The network must be either a local-scoped network or a swarm-scoped network with the attachable option set. A network cannot be re-attached to a running container
post/networks/{id}/connect
Path parameters
idstring required
Network ID or name
Request body
Example request
{
"Container": "3613f73ba0e4",
"EndpointConfig": {
"IPAMConfig": {
"IPv4Address": "172.24.56.89",
"IPv6Address": "2001:db8::5689"
},
"MacAddress": "02:42:ac:12:05:02"
}
}Response
No error