What is the basic difference between the running and starting of a Docker container

0 votes

I am new to docker and its concept. Can anyone help me with some commands?

Since I have used the below command:

docker run -it container_id 

It creates a new container. In that case, what will the below command do.

docker start

I know this is a very basic query. Can anyone resolve this query?


Nov 16, 2018 in DevOps & Agile by Shubham
• 1,000 points

1 answer to this question.

0 votes

Here is the basic difference between run and start command.

Run command is used to create a new container of an image, and execute the container. You can create N clones of the same image. The command is: docker run IMAGE_ID and not docker run CONTAINER_ID

Start command It is used to Launch a container previously stopped. Such as, if you had stopped a database with the command docker stop CONTAINER_ID, you can relaunch the same container with the command docker start CONTAINER_ID, and the data and settings will be the same.

I hope it would resolve you query.

answered Nov 16, 2018 by Damon Salvatore
• 5,980 points

Related Questions In DevOps & Agile

+2 votes
1 answer

What is the difference between a container and an image in Docker?

 Below is reference which you can follow to know ...READ MORE

answered Sep 20, 2018 in DevOps & Agile by shubham
• 7,320 points
0 votes
1 answer

How can a script identify the difference between Docker Toolbox and Docker for Windows?

Now, the Toolbox works through docker-machine. The way ...READ MORE

answered Aug 24, 2018 in DevOps & Agile by Tyrion anex
• 8,690 points
0 votes
1 answer

Get the Ip of a docker container

Here is what you need to do.  Firstly, ...READ MORE

answered Dec 10, 2018 in DevOps & Agile by Damon Salvatore
• 5,980 points
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,140 points
0 votes
1 answer
0 votes
2 answers

difference between the `COPY` and `ADD` commands in a Dockerfile

Hi, COPY and ADD are both Dockerfile instructions that serve similar purposes. They ...READ MORE

answered Dec 23, 2020 in DevOps & Agile by akhtar
• 38,210 points