Docker gives you the ability to version your architecture and 'roll back' to a previous version of a container.
Docker gives you the ability to version your architecture and 'roll back' to a previous version of a container.
You shut down a VM and instruct the hypervisor system to take a "snapshot" which locks the original VHD file and creates a new one. When writes happen, they're performed on the new VHD, and reads have to use both the main and the snapshot VHD. And you can create a chain of snapshots, each pointing to the previous snapshot, for versioning. Or you can have several VM snapshots use the same master VHD, like for CI or data deduplication.
To roll back, it's usually as simple as shutting down the VM and removing the snapshot file.
The way VMs handle this doesn't carry the same semantics as the way you can with Docker. There's a finer-grain composability with Docker that is much more awkward with VMs.
Docker may not be as great as a virtualization tool as VMs -- security concerns, complexity, etc. -- but it is a much better package management tool.
You get most of the benefits of immutable builds anyhow by having scripts which can reliably set up servers from scratch on the fly.