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?

Thanks.


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

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,510 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
• 6,890 points
65 views
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,280 points
66 views
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,510 points
69 views
0 votes
1 answer
0 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
• 56,940 points
227 views
0 votes
1 answer
0 votes
1 answer