0 votes
in Continuous Deployment by

Q. What is the difference between ‘docker run’ and ‘docker create’?

1 Answer

0 votes
by

The primary difference is that using ‘docker create’ creates a container in a stopped state.

Bonus point: You can use ‘docker create’ and store an outputed container ID for later use. The best way to do it is to use ‘docker run’ with --cidfile FILE_NAME as running it again won’t allow to overwrite the file. A good practice is to keep well ogranised directory structure: /containers/web/server1/ws.cid containers/web/server3/ws.cid

Related questions

+1 vote
asked Aug 15, 2020 in DevOps by RShastri
+1 vote
0 votes
+2 votes
asked Aug 15, 2020 in DevOps by RShastri
...