Body: <p>Is there any way to restart the host without loosing all changes that were made to the running container (if the changes were not made on a mounted volume) ?</p>
  <p>I have <code>docker container commit</code> if I'm running pure docker but I wonder if there is a k8s-way to do it.</p>
  
Comments: CC BY-SA 4.0
Comments: 2023-06-08T13:05:58.843Z
Comments: Checkout this post https://stackoverflow.com/questions/69111174/does-kubernetes-have-an-equivalent-to-docker-commit-save
Comments: Taimoor Mirza
Comments: CC BY-SA 4.0
Comments: 2023-06-24T13:35:30.503Z
Comments: "save state of running container" - this is anti-pattern, make your images "immutable". From [docs](https://docs.docker.com/engine/reference/commandline/commit/): Generally, it is better to use Dockerfiles to manage your images in a documented and maintainable way. Good luck!
Comments: Kyslik
Tags: <docker><kubernetes>
Title: How do you safe the state of a running container during reboot of the host?
UserDisplayName: Hoffmann
ThreadText: # How do you safe the state of a running container during reboot of the host?
  
  (Asked by: username_0 on 2023-06-07)
  
  Is there any way to restart the host without loosing all changes that were made to the running container (if the changes were not made on a mounted volume) ?
  
  I have `docker container commit` if I'm running pure docker but I wonder if there is a k8s-way to do it.
  
  **Tags:** docker, kubernetes
  
  > **Comments:**
  > **username_1**: Checkout this post https://stackoverflow.com/questions/69111174/does-kubernetes-have-an-equivalent-to-docker-commit-save  
  > **username_2**: "save state of running container" - this is anti-pattern, make your images "immutable". From [docs](https://docs.docker.com/engine/reference/commandline/commit/): Generally, it is better to use Dockerfiles to manage your images in a documented and maintainable way. Good luck!  
  
  ---
  
  ## 0 answers
  
  