I’m trying to understand when it’s appropriate to do a docker commit versus leveraging the Dockerfile. I understand that the purpose of the Dockerfile is to make building docker images reproducible. Seeing how it is generally advisable to put everything that makes up a docker image into a Dockerfile, when is it appropriate to use docker commit? Is there a general rule of thumb?
I see that in the docs for docker commit there is an example where docker commit is used to commit a change in an environment variable to specify a debug mode. Couldn’t that be specified in a Dockerfile? Is there a definitive case where a Dockerfile would be inappropriate?