Collection of my dotfiles, mostly for emacs usage
To run a portable version of these dotfiles with emacs and tmux included, run:
docker run -it notnarb/dotfiles
Mount current directory (in ~/w/) as current (host) user:
sudo docker run -it -v $PWD:/root/w/ -e PUID=$UID notnarb/dotfiles
Same as above but also allow ssh forwarding from host:
sudo docker run -it -v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK -v $PWD:/root/w/ -e PUID=$UID notnarb/dotfiles
Setting ‘PUID’ will automatically create a user with the same user id within the container and su’s to that user. This allows you to edit files within the container as if you were the user running the command.
(There’s probably a better way to do this, but this works well enough for me!)