From 312a4d584ccbbab93f76f1824cdbadf1b83e93ad Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Wed, 26 Aug 2020 13:00:10 -0400 Subject: [PATCH] doc: Improve docker example to mount in $HOME for easy config access I'm surprised no one has asked any questions about this. --- doc/install.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/install.md b/doc/install.md index b8ec54a8..c4e1f82a 100644 --- a/doc/install.md +++ b/doc/install.md @@ -174,7 +174,13 @@ code-server # It will also mount your current directory into the container as `/home/coder/project` # and forward your UID/GID so that all file system operations occur as your user outside # the container. +# +# Your $HOME/.config is mounted at $HOME/.config within the container to ensure you can +# easily access/modify your code-server config in $HOME/.config/code-server/config.json +# outside the container. +mkdir -p ~/.config docker run -it -p 127.0.0.1:8080:8080 \ + -v "$HOME/.config:/home/coder/.config" \ -v "$PWD:/home/coder/project" \ -u "$(id -u):$(id -g)" \ codercom/code-server:latest