How to name your Docker containers

Learn how to name your Docker containers with this straightforward guide.

Naming Your Container

When creating a new container with docker run, assign a name to your container using the --name flag, followed by your desired container name.

docker run --name your_container_name -p 80:80 -d nginx