This repository provides a secure, minimal, and production-ready Docker image for WeTTY.
👉 Upstream project: https://github.com/butlerx/wetty
👉 This repo is NOT a fork, but a Docker packaging layer.
- Multi-stage Docker build
- Minimal runtime image (Debian slim)
- Non-root container (UID 10001)
- Tracks upstream by default (
WETTY_REF=main) - Optional pinning for reproducible builds (use a tag or commit SHA via build arg)
- No dev dependencies in runtime (
pnpm prune --prod) - Build-time pnpm cache (BuildKit cache mount) for faster rebuilds
- SSH client included
Note: builds are only truly reproducible if you pin
WETTY_REFto a specific tag or commit SHA. Usingmainmeans you’ll pick up upstream updates on rebuild.
docker build -t wetty .Pin upstream ref (optional):
docker build -t wetty --build-arg WETTY_REF=<tag-or-commit-sha> .docker run -p 3000:3000 wettyOpen:
http://localhost:3000
Create compose.yml:
services:
wetty:
image: ghcr.io/frepke/wetty:latest
container_name: wetty
security_opt:
- no-new-privileges:true
ports:
- "3000:3000"
environment:
- BASE=/
- SSHHOST=172.17.0.1
- SSHUSER=root
- TITLE=WeTTY
restart: unless-stoppedRun:
docker compose up -dCreate compose.yml:
services:
wetty:
build:
context: .
args:
WETTY_REF: main # or pin to tag/commit SHA for reproducible builds
ports:
- "3000:3000"
environment:
PORT: "3000"
SSHHOST: "your-server"
SSHPORT: "22"
# BASE: "/"
restart: unless-stoppedRun:
docker compose up --buildThis Compose example builds the image locally from this repository (it does not pull a prebuilt image).
Environment variables supported by WeTTY (depends on upstream version):
- PORT
- BASE
- SSHHOST
- SSHPORT
Example:
docker run -p 3000:3000 -e SSHHOST=your-server wettyWETTY_REF is used during docker build (as a build-arg), not as a runtime environment variable.
So set it like:
docker build --build-arg WETTY_REF=main -t wetty .- Runs as non-root user
- No dev dependencies in runtime
- Minimal attack surface
Same as upstream:
https://github.com/butlerx/wetty/blob/main/LICENSE