10

I'm trying to run a docker and it fails for various reasons. As I check my list of dockers (docker ps -a), I see those names:

pedantic_gauss
recursing_feynman
adoring_brattain
suspicious_tesla
gallant_gates
competent_gates
elated_davinci
ecstatic_mahavira
focused_mirzakhani

I use docker-compose and I'm sure we do not have such names in our setup files. Is that just something docker people thought would be fun to do?! I searched on some of those names and could not really find anything useful, although it looks like these appear on many sites, somewhat sporadically.

4
  • 2
    Those are the default names Docker will set when you don't set one yourself.
    – ThoriumBR
    Feb 10, 2020 at 0:32
  • 1
    @ThoriumBR Wow! Good to know, but why not just use docker1, docker2, etc. These just look scary/hacky! Feb 10, 2020 at 0:41
  • 1
    Perhaps you have a strange definition of scary/hacky :) Feb 10, 2020 at 0:57
  • The names aren't scary. It's an adjective plus a famous name: Gauss, Tesla, Gates, Einstein...
    – ThoriumBR
    Feb 10, 2020 at 5:09

1 Answer 1

14

As mentioned in comments this is part of Docker's innate functionality, and is designed to make it easier to work with containers.

The canonical identifier for a Docker container is a SHA-256 hash, which is not the most user friendly thing to type.

So if you don't specify a name (using --name) when you start a container Docker will assign one to you.

The names are a combination of an adjective and a scientist's name, and the source code for generation is here. There is only one combination that is blocked in the Docker source code which is "boring_wozniak" because Steve Wozniak's not boring.

4
  • Wow! They use a goto... Dec 6, 2020 at 16:51
  • 3
    @AlexisWilke angry_djisktra is allowed by the code
    – stevesliva
    Nov 22, 2022 at 19:38
  • 1
    @stevesliva homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf ... :-) Nov 23, 2022 at 0:27
  • Thanks for your explanation! I finally figure out how does the wield name come from. I find this innovation is not very enjoyable. Perhaps the combination of using 'image name' and a 'random string ID' would be more suitable for new developers.
    – Ryan Lyu
    Dec 10, 2023 at 9:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .