Multiple execution of the same docker image

I was wondering what happens when I run the same image (already pulling out locally) several times?

Does it launch dockerfile every time? (which means every command in the docker file)

Does the restart of the corresponding container restart?

+5
source share
1 answer

Does it launch dockerfile every time?

No: a docker run will create a container based on the image.
The Docker file was used to create the image, but it is not involved at run time.

Does the restart of the corresponding container restart?

Creates a new container for each docker run .

+6
source

Source: https://habr.com/ru/post/1232513/


All Articles