Docker Community Forums

Share and learn in the Docker community.

Why is the sequence _-_ in a container name not valid?

When I use the sequence ‘-’ in a docker image or container name as e.g. in ‘a_-_b’ I get an invalid reference format message upon a docker compose.
I didn’t find any specification which disallows such a name.