feat: startup package installation via env vars (0.9.1)

This commit is contained in:
Timothy Jaeryang Baek 2026-03-05 15:08:37 -06:00
parent ef63677087
commit fb2870fab1
4 changed files with 38 additions and 2 deletions

View file

@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [0.9.1] - 2026-03-05
### Added
- 📦 **Startup package installation** — new `OPEN_TERMINAL_PACKAGES` and `OPEN_TERMINAL_PIP_PACKAGES` environment variables install additional apt and pip packages automatically when the Docker container starts. No need to fork the Dockerfile for common customizations.
## [0.9.0] - 2026-03-04
### Added

View file

@ -26,7 +26,24 @@ That's it — you're up and running at `http://localhost:8000`.
#### Customizing the Docker Environment
The default image ships with a broad set of tools, but you can tailor it to your needs. Fork the repo, edit the [Dockerfile](Dockerfile) to add or remove system packages, Python libraries, or language runtimes, then build your own image:
The easiest way to add extra packages is with environment variables — no fork needed:
```bash
docker run -d --name open-terminal -p 8000:8000 \
-e OPEN_TERMINAL_PACKAGES="cowsay figlet" \
-e OPEN_TERMINAL_PIP_PACKAGES="httpx polars" \
ghcr.io/open-webui/open-terminal
```
| Variable | Description |
|---|---|
| `OPEN_TERMINAL_PACKAGES` | Space-separated list of **apt** packages to install at startup |
| `OPEN_TERMINAL_PIP_PACKAGES` | Space-separated list of **pip** packages to install at startup |
> [!NOTE]
> Packages are installed each time the container starts, so startup will take longer with large package lists. For heavy customization, build a custom image instead.
For full control, fork the repo, edit the [Dockerfile](Dockerfile), and build your own image:
```bash
docker build -t my-terminal .

View file

@ -34,4 +34,17 @@ if [ "$OWNER" != "user" ]; then
sudo chown -R user:user /home/user 2>/dev/null || true
fi
# Auto-install system packages
if [ -n "${OPEN_TERMINAL_PACKAGES:-}" ]; then
echo "Installing system packages: $OPEN_TERMINAL_PACKAGES"
sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends $OPEN_TERMINAL_PACKAGES
sudo rm -rf /var/lib/apt/lists/*
fi
# Auto-install Python packages
if [ -n "${OPEN_TERMINAL_PIP_PACKAGES:-}" ]; then
echo "Installing pip packages: $OPEN_TERMINAL_PIP_PACKAGES"
pip install --no-cache-dir $OPEN_TERMINAL_PIP_PACKAGES
fi
exec open-terminal "$@"

View file

@ -1,6 +1,6 @@
[project]
name = "open-terminal"
version = "0.9.0"
version = "0.9.1"
description = "A remote terminal API."
readme = "README.md"
authors = [