Skip to content

Embedded DNS is case-sensitive #28689

@thaJeztah

Description

@thaJeztah

Discovered this while discussing accepted characters for containers with @mstanleyjones;

docker network create foo
docker run -d --name FOO --net foo nginx:alpine
docker run -d --name foo --net foo nginx:alpine

docker run -it --rm --net foo alpine sh
/ # ping foo
PING foo (172.18.0.3): 56 data bytes
64 bytes from 172.18.0.3: seq=0 ttl=64 time=0.113 ms
64 bytes from 172.18.0.3: seq=1 ttl=64 time=0.099 ms
^C
--- foo ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.099/0.106/0.113 ms
/ # ping FOO
PING FOO (172.18.0.2): 56 data bytes
64 bytes from 172.18.0.2: seq=0 ttl=64 time=0.136 ms
64 bytes from 172.18.0.2: seq=1 ttl=64 time=0.096 ms
/ # ping fOo
ping: bad address 'fOo'

If looks like the embedded DNS is case sensitive, so resolving container IP addresses doesn't work if the wrong case is used. Also two containers on the same network can have the same name (but different case), which should be a conflict, but currently isn't.

/cc @mavenugo

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingkind/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