I'm trying to figure out the ordering and priority of Dockerfile entrypoint, cmd and run. And additionally how each persists over stopping and restarting the container.
Supposing:
A docker container is configured to have an entrypoint program_1
. It is then started with docker run my_container program_2
.
The container is then stopped and restarted with docker stop my_container
docker start my_container
.
Which and in what order will the commands be run?
I'm specifically interested in the whether the command from docker run
will persist.