Search code examples
dockerdocker-machine

docker-machine stop command kills all my containers


I am using docker-machine, and I created a VM with VirtualBox driver. I would like to pause my machine without killing all the running docker dontainers in that machine. Is this possible to do somehow? I would like to resume my machine, and resume all my containers that were running.


Solution

  • You should be able to do it as long as you use Pause or Save State on Virtualbox. When you use Pause or Save State on VirtualBox all of your 'run' state is stored on the disk and then when you Unpause or Restart that 'run' state is restore from disk. Tried it myself and it works great.

    Save State/Pause

    This equivalent to using 'Suspend' on VMware.