From 7a0a5384ee9522ab4970411b1a5bac4ec6178c9f Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 12 Oct 2026 20:00:32 +0700 Subject: [PATCH] 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. --- code-server/Dockerfile | 11 +++++++++++ code-server/README.md | 20 ++++++++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/code-server/Dockerfile b/code-server/Dockerfile index 6a296fc..caa7430 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -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 diff --git a/code-server/README.md b/code-server/README.md index 651a262..ebfe18b 100644 --- a/code-server/README.md +++ b/code-server/README.md @@ -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.