Docker: Save Current State: Difference between revisions

From wiki.jacobjohns.com
jwiki>jjohns
No edit summary
m 2 revisions imported
 
(No difference)

Latest revision as of 16:06, 27 July 2024



  1. Use docker commit to save a containers current state.
    • docker commit nginx nginx:backup
  2. This adds an image of the container to the local repository. So, if a change is made to a container and needs to be reverted it can be done so individually.
  3. To remove an image use docker images to list all images and docker rmi to remove the image by name:tag or Image ID.
    • docker images
    • docker rmi nginx:backup