Pause Container for system reboot and unpause

Hello everyone.

I have a process running in a docker container and I need to restart my system. Is it possible to pause the process and reboot my computer and unpause the process so that it continues to run from the point I had to pause it?
So I basically want to know if it is possible to “save” a process and resume it again.

Best regards,

This is Docker swarm scenario that i have upgraded Docker engine.-

Docker swarm - Total 3 nodes, 1 leader node and 2 worker node.

Go to UCP and Select the Node you want upgrade docker engine. and click on configuration and select pause and Drain. your containers will be automatically moved to other nodes.

Once u click on pause. no New containers will be directed to the current node. so you can continue to upgrade docker engine and reboot your node.

once the node is up and go to the same node and click on configure and click on unpause . so now now containers can be moved to the current node

May be this helps you to understand usage of pause and unpause in docker swarm.

Thank you for your reply @anand2011. The thing is that I not only have to restart Docker, but my whole system, meaning I have to restart my PC. Do you know of a way saving the current process and resume it after the restart?

docker save


Save one or more images to a tar archive (streamed to STDOUT by default)


docker save [OPTIONS] IMAGE [IMAGE...]

Below are Docker Life Cycle Commands

No. There is no such capability in lightweight containers or in common operating systems like linux or windows.

Let me ask…can you think of such a capability offered on a non-docker system? For example, generally, in windows or linux, can I take a snapshot of a process, reboot the system, and then restore the snapshot to continue from there? I’m sure there is no such thing for processes running on a host. Do you know of one?

Most applications are designed to store their important state data in a persistent manner so the data will survive a crash or shutdown. Then, after reboot, as a new instance of process is started, it reads the important state data from storage. Using the state data, the application figures out for itself where it left off.

I could be wrong in understanding what you are seeking.

I am looking for a reply for the same question. I have a process running since 8 hours ago and it’ll take 120hs more to complete, but I have to restart the computer in next two hours. What I need is something like VirtualBox offers, save the state of the running OS and restore again later.

Hi, this is not something you can do with docker im afraid

@viktorgorte @terpz I know its super old topic, however this is possible with docker checkpoint where it persist data on disk as snapshot and you can resume from saved snapshot at any time.

This is true, this feature was released a couple of days after this post as an experimental feature :slight_smile: