Sign inSign up

jjgroenendijk/arch-vscode

By jjgroenendijk

•Updated 5 days ago

Arch Linux container with VS Code accessible via web interface

Image
0

7.7K

jjgroenendijk/arch-vscode repository overview

⁠Arch Linux VS Code Docker Container

Arch Linux development environment running VS Code (code serve-web) in the browser.

⁠Quick Start

mkdir -p ./home
docker run -d \
  -v $(pwd):/workspace \
  -v $(pwd)/home:/home/developer \
  -p 8080:8080 \
  ghcr.io/jjgroenendijk/arch-vscode:latest

Open http://localhost:8080⁠.

⁠Docker Compose

services:
  arch-vscode:
    image: ghcr.io/jjgroenendijk/arch-vscode:latest
    environment:
      - PUID=1000
      - PGID=1000
      - EXTRA_PACKAGES=
      - NPM_PACKAGES=
    volumes:
      - ./:/workspace
      - ./home:/home/developer
    ports:
      - "8080:8080"
    restart: unless-stopped

⁠Configuration

Copy .env.example to .env and edit. Key variables:

VariableDefaultPurpose
PUID / PGID1000Match host user to avoid permission issues
USERNAMEdeveloperContainer user
WORKSPACE_DIR/workspaceWorkspace path inside container
VSCODE_HOST0.0.0.0Bind address
VSCODE_PORT8080Listen port
VSCODE_CONNECTION_TOKEN(empty)Auth token (empty = no auth)
EXTRA_PACKAGES(empty)Space-separated pacman packages
NPM_PACKAGES(empty)Space-separated global npm packages
AUTO_UPDATEfalseDaily system update at 02:00
TZUTCTimezone

See .env.example for the complete list.

⁠Persistence

When ./home is mounted to /home/developer, settings, extensions and shell config persist across restarts. Project files belong in the path mounted to /workspace.

⁠Notes

  • VS Code tracks the latest stable release from Microsoft. Override it at build time with --build-arg VSCODE_VERSION=1.130.0 if you need a specific release.
  • The container user has passwordless sudo.
  • The package database is synced on each start, so EXTRA_PACKAGES works even with an old image.

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:5cc5dfb99…

Size

1.2 GB

Last updated

5 days ago

docker pull jjgroenendijk/arch-vscode