Reputation: 943
How is possible to assign a name to a container while using docker run with interactive mode?
For example, running this command
docker run -d -it docker_image_already_created sh
when checking with docker ps
the name is autogenerated. How can the container name be passed?
Upvotes: 38
Views: 52817
Reputation: 14255
Provide the --name
option:
docker run -d --name your_name -it docker_image_already_created sh
Upvotes: 70