/spacek8s

Primary LanguageShell

Spacemacs within tmux within a Docker container

The tmux config has been customized to be closer to screen and vim

The tmux bind key is ctrl+a

Usage Examples

map the current directory to ~/src in the container

docker run -itv $(pwd):/home/spacemacs/src quay.io/jgmize/spacemacs-tmux

map the current directory to ~/src in the container and use the host .ssh and .gitconfig

docker run -it \
  -v $(pwd):/home/spacemacs/src \
  -v $HOME/.ssh:/home/spacemacs/.ssh \
  -v $HOME/.gitconfig:/home/spacemacs/.gitconfig \
  quay.io/jgmize/spacemacs-tmux

Caveats and Workarounds

  • Attempting to detach with the tmux keybinding ctrl+a d will kill the container, but you can detach via the docker keybinding ctrl+p ctrl+q
  • Attempting to attach to the running tmux session with docker exec and tmux attach will fail with open terminal failed: not a terminal, but docker attach works

Related projects