GithubHelp home page GithubHelp logo

critmux's Introduction

Freeze. Thaw. Repeat.

This is a tech demo of CRIU and Docker integration, featuring tmux.

See it live in this ASCII video demo!

  1. docker run -t -i --privileged --name critmux jpetazzo/critmux
  2. Do stuff in tmux. Don't know what to do? Just type a few characters.
  3. From another terminal, docker stop critmux. Container stops.
  4. docker start critmux ; docker attach critmux. MIND. BLOWN.

Note: docker start -a doesn't quite work.

What the?

This container starts a little wrapper, which sets up a SIGTERM signal handler. Then it checks if there is some saved state in /state:

  • if there is no saved state, we assume a clean start, setup a tmux session, and attach to it;
  • if there is a saved state, it is restored it (it should be a tmux daemon process), then we attach to tmux.

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.

Requirements

You need a fairly recent kernel. Debian's 3.14 works; some people reported that 3.13 didn't.

AUFS won't work.

critmux's People

Contributors

emazzotta avatar jpetazzo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

tomhey creatorrr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.