The docker stop command kills all my containers

I am using a docker machine and I created a virtual machine with a VirtualBox driver. I would like to suspend my car without killing all the working dockers in this car. Is there any way to do this? I would like to resume my machine and resume all of my containers that were running.

+4
source share
2 answers

You should be able to do this while using Pauseor Save Statein Virtualbox. When you use Pauseeither Save StateVirtualBox, all of your “start” states are saved to disk, and then when you Unpauseor Restart, which “starts” state, is restored from disk. Tried it myself and it works great.

Save Status / Pause

This is equivalent to using Suspend on VMware.

+4
source

Or from the command line:

VBoxManage controlvm YOURDOCKERMACHINENAME savestate

To renew:

docker-machine start YOURDOCKERMACHINENAME && eval $(docker-machine env YOURDOCKERMACHINENAME)

+3
source

Source: https://habr.com/ru/post/1607027/


All Articles