Answer the question
In order to leave comments, you need to log in
Is it correct to rebuild a Docker image when a container is running?
To speed up the deployment, I want to first rebuild the image from the Dockerfile, and then recreate and restart the container. How correct is this and will there be a failure in the running container based on this image during the build process, since the layers of the image will change in theory?
Answer the question
In order to leave comments, you need to log in
Absolutely normal decision. The running container will use the old image. Even if you build a new image with the same name and tag, it will still have a different id.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question