Skip to content

Docker should not allow creating a network called "default", as it's a reserved name #19422

@thaJeztah

Description

@thaJeztah

Docker currently allows creating a network called "default", but should not, because "default" is a reserved name (see #19421), and a network called "default" is not usable after creating;

$ docker network create default
5c34b64abce1ce65b280f7cc008bb2eae4bbbf036046b87e8dd4ad215923c4e9

$ docker run --net=default -itd busybox sh
9abd4f4e6610da0a2870c661b9c48d6d55fb5a35efefbf349a9ae5bbdf975c7d

# The container is actually connected to the "bridge" network, which is the "default"
$ docker inspect --format='{{json .NetworkSettings.Networks}}'  9abd4f4e6610da0a2870c661b9c48d6d55fb5a35efefbf349a9ae5bbdf975c7d
{"bridge":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"b41125b6469d76594cbea321e77438ab42dc4881b0f0d9fa8cb8a9163396ec3a","EndpointID":"4eda38a6fe1ffa5f259e6ff48e30b353c84d2c572b9e6e2115c4be15e21ca23d","Gateway":"172.17.0.1","IPAddress":"172.17.0.4","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:11:00:04"}}

Metadata

Metadata

Assignees

Labels

area/networkingNetworkingkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions