Docker uses a special ("default") value for --net if no network is specified.
The "default" value is set as default value in this flag;
https://github.com/docker/docker/blob/73a5393bf3530815a608725fe2546121ccadbfe4/runconfig/opts/parse.go#L83
And was introduced here;
da5a3e6
However, docker run --ip=... does not treat this value as special, and will look for a network by that name:
docker run --ip=172.17.0.18 -itd busybox sh
0267261b0fb81d7dd7c660935f71e44deb5ba202c9e0ff4925f9bbf0231dcf78
docker: Error response from daemon: network default not found.
Where, instead, it should produce:
docker: Error response from daemon: User specified IP address is supported on user defined networks only.
(I'm not a big fan of this "default" special value, but I'll create a separate issue for that)
Docker uses a special ("default") value for
--netif no network is specified.The "default" value is set as default value in this flag;
https://github.com/docker/docker/blob/73a5393bf3530815a608725fe2546121ccadbfe4/runconfig/opts/parse.go#L83
And was introduced here;
da5a3e6
However,
docker run --ip=...does not treat this value as special, and will look for a network by that name:Where, instead, it should produce:
(I'm not a big fan of this "default" special value, but I'll create a separate issue for that)