mfrachet
mfrachet

Reputation: 8922

Running multiple time the same docker image

I was wondering what is happening exactly when I run the same image (already pull locally) multiple time ?

Does it run the dockerfile each time ? (meaning each command in the docker file)

Does it rerun (restart) the container concerned ?

Upvotes: 9

Views: 6908

Answers (1)

VonC
VonC

Reputation: 1323183

Does it run the dockerfile each time ?

No: a docker run will create a container based on the image.
The Dockerfile was used to build the image, but it not involved at runtime.

Does it rerun (restart) the container concerned?

It create a new container for each docker run.

Upvotes: 10

Related Questions