Sign inSign up

bitdruid/vscode-in-docker

By bitdruid

•Updated 7 days ago

Image
0

336

bitdruid/vscode-in-docker repository overview

⁠VS Code in a Container

Docker Pulls Image Size

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⁠.

VS Code running in the container

⁠Go

docker compose up -d --build

Then open http://localhost:5800⁠.

⁠Home

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.

⁠Ports

PortDescription
5800Web interface (noVNC): http://localhost:5800⁠
5900VNC, for a VNC client

⁠Volumes

VolumeMountContent
vscode-home/home/appUser home: VS Code settings and extensions, dotfiles, projects
vscode-config/configBase image state: logs, certificates, web login

⁠Environment

VariableDefault (compose)Description
TZEurope/BerlinTime zone
USER_ID / GROUP_ID1000 / 1000UID/GID of the user app; files in the home are owned by these
DISPLAY_WIDTH / DISPLAY_HEIGHT1920 / 1080Resolution of the virtual screen
KEEP_APP_RUNNING1Restart VS Code automatically when it is closed or crashes
WEB_FILE_MANAGER1File manager in the web interface (upload/download)
WEB_FILE_MANAGER_ALLOWED_PATHS/home/appPaths the web file manager can access
AUTO_UPDATE1Update 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 updates

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.

  • Turn it off with AUTO_UPDATE=0.
  • Update by hand from the terminal with vscode-update, then restart VS Code.

⁠zsh

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.

⁠GitHub sign-in

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

Tag summary

Content type

Image

Digest

sha256:48c3c8000…

Size

605.9 MB

Last updated

7 days ago

docker pull bitdruid/vscode-in-docker