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.
Docker Stop COMMAND. The docker stop command stops the container gracefully and provides a safe way out. If a docker stop command fails to terminate a process within the specified timeout, the Docker issues a kill command implicitly and immediately.
The docker stop command attempts to stop a running container first by sending a SIGTERM signal to the root process (PID 1) in the container. If the process hasn't exited within the timeout period a SIGKILL signal will be sent.
The container has consumed too much memory, and has been killed by the host OS: If the operating system detects that it's running out of memory, it might start killing processes to free up memory. If a container is using a lot of memory or resources, it might be killed by the OS.
If you do, killing multiple containers takes one command: docker-compose down. You could also run docker-compose without detached mode. If so, you'll just use ^C to kill all containers. And there you have it—all containers killed!
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.
This equivalent to using 'Suspend' on VMware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With