-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Closed
Copy link
Labels
area/networkingNetworkingNetworking
Description
Related to #19417
Docker creates a container, even if the network options are invalid. For example;
# docker run --ip=172.17.0.18 -itd --net=bridge busybox sh
14bed02fbc4c9901b4d562844ec3d03e7773259375a07037a2f4062ce0671b17
docker: Error response from daemon: User specified IP address is supported on user defined networks only.
The above instruction created a container, and apparently assigned an IP-address
(note that the same IP-address is used for each container that fails);
"Networks": {
"bridge": {
"IPAMConfig": {
"IPv4Address": "172.17.0.18"
},
"Links": null,
"Aliases": null,
"NetworkID": "",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": ""
}
}
Expected result
No container being created if the passed options are invalid
Metadata
Metadata
Assignees
Labels
area/networkingNetworkingNetworking