snabbco / snabb

Snabb: Simple and fast packet networking
Apache License 2.0
2.98k stars 301 forks source link

Docker workflow "cheat sheet" for Snabb Lab #635

Open lukego opened 9 years ago

lukego commented 9 years ago

These days chur is running NixOS (a Linux distribution) and provides Docker for users. The idea is to use NixOS like a "hypervisor" for running Docker containers where the real work is done. That means as users we don't have to learn NixOS but we do have to learn Docker to get access to more comfortable and familiar test environments e.g. Debian / Ubuntu / Fedora / etc.

So we need a Docker "cheat sheet" for how to accomplish various things:

  1. Create a persistent container (e.g. based on Ubuntu) that you can run all your normal tools inside: git, emacs/vi, tmux, etc. This would support the most primitive workflow i.e. simply create one container and do all your work inside that. (Have to also know how to reattach to the container and what happens during events like server reboots.)
  2. Create multiple such containers with variable lifetimes as different test environments.

... and what other use cases?

lukego commented 9 years ago

Could also be that Docker is not right for all the use cases I have in mind e.g. running your text editor and compiler etc. Then we would need an alternative solution for day-to-day hacking e.g. a NixOS cheat sheet.

Please feel free to rant here for and against Docker, NixOS, and other container-like software (chroot, LXD, etc) that could be relevant for day to day hacking on chur :).

(I was surprised to discover that Docker hard codes its escape key to Control-P. That does not make it an attractive environment to run Emacs inside all day long.)