This is a fork of jess/sublime-text:3. The problem I encountered with that Docker container configuration was that every file was being written to as
root:root. After fumbling with permissions and the Dockerfile for a couple hours, I was able to get it to write to all files as
- My version, which adds the current directory to the Sublime sidebar upon startup: https://github.com/chuck-knox/sublime3-docker
- Official version, which does not do the above (but it provides instructions in case you want to): https://github.com/jfrazelle/dockerfiles
This image has been submitted as a pull request to jfrazelle/dockerfiles: https://github.com/jfrazelle/dockerfiles/pull/160
$HOME/Documents directory will be opened as a folder in Sublime Text. Change it if you need to, for example if you want to open your home directory, you can specify
docker run -d -it \ -w $HOME/Documents \ -v $HOME/.config/sublime-text-3:$HOME/.config/sublime-text-3 \ -v $HOME/Documents:$HOME/Documents \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v $HOME/.local/share/recently-used.xbel:$HOME/.local/share/recently-used.xbel \ -e DISPLAY=$DISPLAY \ -e NEWUSER=$USER \ charlesmknox/sublime-text-3 /run.sh
The GitHub repo includes instructions for creating a desktop shortcut file.