feat(code-server): add command-line utilities to the image

Install network, DNS, search, lint, database-client and maintenance tools
from Debian so every fresh deploy has them without a setup step.
This commit is contained in:
tiennm99 committed 2026-10-12 20:00:32 +07:00
1 parent 5b42dc2505
commit 7a0a5384ee
2 files changed
+29 -2

No files matched your search

+11
View File
@@ -8,6 +8,17 @@ RUN apt-get update \
build-essential bubblewrap unzip zip \
&& rm -rf /var/lib/apt/lists/*
# Command-line utilities: network and DNS, search and review, lint,
# database clients, and backup and maintenance.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
iproute2 lsof bind9-dnsutils netcat-openbsd socat mtr-tiny whois \
tree fd-find fzf git-delta bat \
shellcheck shfmt yamllint \
postgresql-client sqlite3 redis-tools \
ncdu tmux restic rclone age hyperfine entr 7zip \
&& rm -rf /var/lib/apt/lists/*
# Workspace directory, owned by the container user.
RUN mkdir -p /workspace && chown 1000:1000 /workspace
+18 -2
View File
@@ -4,8 +4,8 @@
official `codercom/code-server` image.
The image ships code-server on Debian with `git`, `zsh`, `curl`, `sudo` and a
few editors. The `Dockerfile` adds `build-essential`, `bubblewrap`, `zip` and
`unzip`, and wraps the entrypoint so it starts in `/workspace` and `coder` can
few editors. The `Dockerfile` adds `build-essential`, `bubblewrap`, `zip`,
`unzip` and a set of command-line utilities, and wraps the entrypoint so it starts in `/workspace` and `coder` can
use the Docker socket. Language toolchains and CLIs are installed into home,
below.
@@ -231,6 +231,22 @@ image ships none of them. `build-essential` supplies the `gcc` and `make` that
native builds expect: the linker `cargo` calls, node-gyp addons and Python
sdists.
The command-line utilities are Debian packages too, kept in the image as a
baseline every fresh deploy has without a setup step:
| Group | Packages |
| --- | --- |
| Network and DNS | `iproute2` (`ss`, `ip`), `lsof`, `bind9-dnsutils` (`dig`), `netcat-openbsd` (`nc`), `socat`, `mtr-tiny`, `whois` |
| Search and review | `tree`, `fd-find`, `fzf`, `git-delta`, `bat` |
| Lint | `shellcheck`, `shfmt`, `yamllint` |
| Database clients | `postgresql-client` (`psql`), `sqlite3`, `redis-tools` (`redis-cli`) |
| Maintenance | `ncdu`, `tmux`, `restic`, `rclone`, `age`, `hyperfine`, `entr`, `7zip` (`7z`) |
Debian installs `fd` as `fdfind` and `bat` as `batcat`. They track Debian 13's
versions, which lag upstream: `rclone` is 1.60, and `postgresql-client` is 17,
whose `pg_dump` refuses to dump a newer server. Install a newer copy into home
when one of these falls short.
Everything else lives in home rather than the image, so the image build stays
small and a redeploy does not reinstall or upgrade tools behind your back;
upgrading is the same commands run again.