In most tutorials, they stop a container before commit it. For example: https://docs.oracle.com/cd/E52668_01/E54669/html/section_c5q_n2z_fp.html
Once I forgot to stop it before commit. But the commit is still successfully done! I am wonder whether there are any hidden damages.
By default, docker will automatically pause the container during commit to make sure it's committing the container in a consistent state, so committing a running container should not be a problem; from the docs:
By default, the container being committed and its processes will be paused while the image is committed. This reduces the likelihood of encountering data corruption during the process of creating the commit. If this behavior is undesired, set the ‘p’ option to false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With