Do Docker images save the memory state?

Very new to docker, apologies for the trivial question. I'm currently using a VM and creating live snapshots (which of course save the state of the memory, etc), such that when I revert its at that exact moment. Do Docker snapshots work in a similar way? If I snapshot it with a running application will it restore to that same state?

Upvotes: 10

Views: 4389

Answers (2)

Andy
Andy

Reputation: 38317

The CRIU project is working on technology which will make it easy to checkpoint and migrate containers, including RAM snapshots.

Upvotes: 16

seanmcl
seanmcl

Reputation: 9946

No. It saves "layers", which are essentially overlays on the file system, with some other magic for environment variables, ports, etc. No memory state is saved whatever.

Upvotes: 11

Related Questions