Difference between docker run & docker start

Total
0
Shares
difference between docker start and docker run

In this article we will look at the differences between docker run and docker start command. We will discuss which one to use and when.

docker run docker start
This command is used on docker images This command is used on docker containers
It creates a new container This starts an existing container
It can download an image, if not already, then create container It can’t create a container
We can provide extra parameters here like container name, bind ports etc. We can’t modify container with this command

Using docker run

To start a container using image, run this command –

docker run node

Adding a custom name to the container –

docker run node --name my-node-container

Using docker start

Run an existing container using this command –

docker start <container_id>

Or

docker start <container_name>
// for ex - docker start my-node-container

Sign Up for Our Newsletters

Get only the best articles delivered to your mail

You May Also Like