docker run --name mycontainer nginx

Category: Docker

docker run --name mycontainer nginx

Run container with a specific name

Names the container 'mycontainer' so you can refer to it by name instead of a random ID.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.