Does Stopping a Docker Container Equate to Shutting Down a VirtualBox VM?

To clarify, stopping a running Docker container is not the same as pausing it. Stopping a container terminates the processes inside the container and releases associated resources (like CPU and memory), but the container’s filesystem and state remain intact, similar to how VirtualBox retains hard disk data after shutting down a VM. The container’s data stays unless explicitly deleted (using rm).

The Difference Between Stop and Pause:

  • Stop: Completely terminates all processes inside the container, similar to turning off the power. When the container is restarted, it begins from its configured entry process.
  • Pause: Freezes all processes inside the container, keeping their state intact, but without releasing resources. A paused container can be resumed, much like the Suspend feature in VirtualBox.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注