English | Русский
Docker environment for code-server (VS Code in the browser) with a ready-to-use toolchain: Python 3.12 + venv, Java 21 (Temurin) and Groovy 5 via SDKMAN. This repository demonstrates the image build implementation; no application code is included in the public version — the workspace folder is empty and serves as the entry point for your own code.
.
├── docker-compose.yml # build the image from source and run it
├── docker-compose.prebuilt.yml # run an already-built image (no build step)
├── .env.example # environment variable template
└── code-server/
├── Dockerfile.Ubuntu-24.04 # build on top of ubuntu:24.04 (python from apt)
├── Dockerfile.Ubuntu-26.04 # build on top of ubuntu:26.04 (python from source)
├── requirements.txt # pinned Python dependencies for the venv
└── workspace/ # working folder inside the container (/home/coder/workspace)
Both Dockerfiles do the same thing; they differ only in the base image and how Python is installed:
- System packages —
curl,build-essential,zip/unzip,git, build libraries. - code-server — installed from the official
.debon GitHub releases; the version is set viaENV CODE_SERVER_VERSION. - User — a non-root
coderuser is created with passwordless sudo. - Python environment — a venv at
/home/coder/.venv, dependencies installed fromrequirements.txt(pinned versions: pandas, numpy, opencv, torch, transformers, paddleocr, lxml, etc.); the venv is added toPATH. - Java + Groovy — via SDKMAN: Java
21.0.4-temand Groovy5.0.5(both set as default);JAVA_HOME/GROOVY_HOMEare added toPATH, and SDKMAN initialization is added to.bashrc. - Working folder —
workspace/is copied to/home/coder/workspaceand opened by code-server on startup.
The image is built via docker compose (build.context: ./code-server/); the image tag comes from the CODE_SERVER_VERSION variable.
cp .env.example .env # and change PASSWORD
docker compose up --build # build + run (Dockerfile.Ubuntu-24.04)The UI is at http://localhost:8080, the password is the one from PASSWORD.
# another base image: in docker-compose.yml switch
# dockerfile: Dockerfile.Ubuntu-26.04
# run without building (image already built or in a registry)
docker compose -f docker-compose.prebuilt.yml up| Variable | Purpose |
|---|---|
CODE_SERVER_VERSION |
code-server version and image tag |
PASSWORD |
web UI password |
PORT |
host port (the container always listens on 8080) |
USER |
user inside the container |
IMAGE |
(prebuilt) image name in a registry |
Resources: the container is limited to 4 GB of memory; the healthcheck polls /healthz every 10 seconds.
.envis in.gitignore— real passwords never get committed.- The password is passed to the container via
environment, not baked into the image. .gitignorealso excludes logs,__pycache__, and input/output files underworkspace/so working data can't accidentally end up in a commit.
- Docker + Docker Compose v2
- ~6 GB of disk for the image (torch and paddle are among the dependencies)