Identifying a container by name 

You can identify a container using one of three identifiers:

  • The UUID long identifier, for example, a415f4b646e3a715dc9fa446744934fc99ea33dd28761456381b9b7f6dcaf76b
  • The UUID short identifier, for example, a415f4b646e3
  • The name, for example, nostalgic_euler

If you do not assign a name to a container when you run docker run, the Docker daemon will auto-generate a name for you, which has the structure <adjective>_<noun>. However, it might be more helpful to assign a name that describes the container’s function within the context of the whole application. We can do that through the --name flag.

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.