This is a tech demo of CRIU and Docker integration, featuring tmux.
See it live in this ASCII video demo!
docker run -t -i --privileged --name critmux jpetazzo/critmuxdocker stop critmux. Container stops.docker start critmux ; docker attach critmux. MIND. BLOWN.Note: docker start -a doesn't quite work.
This container starts a little wrapper, which sets up a SIGTERM
signal handler. Then it checks if there is some saved state in
/state:
tmux session, and attach to it;The signal handler just sends a detach command to tmux; and the
wrapper arranges for the state to be saved when tmux is detached.
In other words, when detaching from tmux, or when sending SIGTERM,
or when doing docker stop on the container, we end up saving its
state.
You need a fairly recent kernel. Debian's 3.14 works; some people reported that 3.13 didn't.
AUFS won't work.
Content type
Image
Digest
Size
347.7 MB
Last updated
over 9 years ago
docker pull emazzotta/critmux