Sign inSign up

ksnarf/vscode

By ksnarf

•Updated 6 months ago

A browser-based VS Code environment built on Ubuntu

Image
0

1.7K

ksnarf/vscode repository overview

⁠vscode-ubuntu

A browser-based VS Code environment (code-server⁠) built on Ubuntu, pre-loaded with a cloud/infrastructure toolchain. Intended to run behind a reverse proxy (Caddy, Nginx, etc.) that handles authentication.

⁠Included Tools

ToolVersion
code-server4.96.2
Terraform1.10.5
kubectl1.32.2
yq4.45.1
AWS CLI v2latest
AWS Session Manager Pluginlatest
GitHub CLI (gh)latest
gimme-aws-credslatest
zsh + oh-my-zshlatest

⁠Quick Start

⁠Pull and run
docker run -d \
  --name vscode \
  -p 8080:8080 \
  -v $(pwd)/workspace:/workspace/code \
  ksnarf/vscode-ubuntu:latest

Open http://localhost:8080 in your browser.

⁠With AWS credentials

AWS credential paths are isolated to /workspace/aws to avoid collisions with host config:

docker run -d \
  --name vscode \
  -p 8080:8080 \
  -v $(pwd)/workspace:/workspace/code \
  -v ~/.aws:/workspace/aws \
  ksnarf/vscode-ubuntu:latest

⁠Build

docker build -t vscode-ubuntu .
⁠Pinning tool versions

All versioned tools are controlled via build ARGs:

docker build \
  --build-arg CODE_SERVER_VERSION=4.96.2 \
  --build-arg TERRAFORM_VERSION=1.10.5 \
  --build-arg KUBECTL_VERSION=1.32.2 \
  --build-arg YQ_VERSION=4.45.1 \
  -t vscode-ubuntu .

⁠Workspace Layout

PathPurpose
/workspace/codeMount point for your project files
/workspace/tmpScratch space
/workspace/artifactsBuild outputs
/workspace/awsAWS config and credentials (isolated from host ~/.aws)

⁠Authentication

code-server runs with --auth none. Do not expose port 8080 directly to the internet. Place this behind a reverse proxy that enforces authentication (e.g. Caddy with basicauth or an SSO provider via Authentik/Authelia).

Example Caddy snippet:

vscode.example.com {
    reverse_proxy vscode:8080
    basicauth {
        user $2a$14$...
    }
}

⁠Environment Variables

VariableDefaultDescription
AWS_CONFIG_FILE/workspace/aws/configAWS CLI config path
AWS_SHARED_CREDENTIALS_FILE/workspace/aws/credentialsAWS credentials path
OKTA_CONFIG/workspace/aws/okta_aws_login_configgimme-aws-creds config path

Tag summary

Content type

Image

Digest

sha256:e04352059…

Size

388.3 MB

Last updated

8 months ago

docker pull ksnarf/vscode