The default network bridge has no name/alias resolution capabilites! To use container names/alias assign the container to a user-defined bridge network.
Containers on the default bridge network can only access each other by IP addresses, unless you use the
--linkoption, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias. Source: docs.docker.com/network/bridge