The desktop version of VS Code in a Docker container, used through a web browser (noVNC) or a VNC client.
Built on jlesage/docker-baseimage-gui.
docker compose up -d --build
Then open http://localhost:5800.
The user app has a normal home at /home/app, with zsh as its login shell. VS Code, its terminal and file dialogs start there. VS Code's settings and extensions, git/gh config and the projects all live in this folder.
| Port | Description |
|---|---|
5800 | Web interface (noVNC): http://localhost:5800 |
5900 | VNC, for a VNC client |
| Volume | Mount | Content |
|---|---|---|
vscode-home | /home/app | User home: VS Code settings and extensions, dotfiles, projects |
vscode-config | /config | Base image state: logs, certificates, web login |
| Variable | Default (compose) | Description |
|---|---|---|
TZ | Europe/Berlin | Time zone |
USER_ID / GROUP_ID | 1000 / 1000 | UID/GID of the user app; files in the home are owned by these |
DISPLAY_WIDTH / DISPLAY_HEIGHT | 1920 / 1080 | Resolution of the virtual screen |
KEEP_APP_RUNNING | 1 | Restart VS Code automatically when it is closed or crashes |
WEB_FILE_MANAGER | 1 | File manager in the web interface (upload/download) |
WEB_FILE_MANAGER_ALLOWED_PATHS | /home/app | Paths the web file manager can access |
AUTO_UPDATE | 1 | Update VS Code on container start |
VSCODE_OPEN | (unset) | Folder to open on every start; unset = restore the last session |
VNC_PASSWORD | (unset) | Password for VNC and the web interface |
The base image supports more variables (dark mode, web authentication, etc.). See its README.
VS Code is updated on every container start, before it launches. If the latest version is already installed, nothing is downloaded. If the update fails (no network, timeout), the installed version starts instead.
AUTO_UPDATE=0.vscode-update, then restart VS Code.oh-my-zsh with the powerlevel10k theme and these plugins:
The MesloLGS NF font is installed for the prompt.
All of this is copied into the home on first start, so you can update it yourself with omz update. p10k configure runs the first time you open a terminal.
The container has no web browser, so sign in with a device code: VS Code shows a code that you enter at https://github.com/login/device in any browser. Set this in VS Code's settings.json:
"github-authentication.preferDeviceCodeFlow": true
Content type
Image
Digest
sha256:48c3c8000…
Size
605.9 MB
Last updated
7 days ago
docker pull bitdruid/vscode-in-docker