Problem
mcr.microsoft.com/devcontainers/base:ubuntu-24.04 brings ~600 MB of devcontainer features (git feature 393 MB, common-utils 203 MB) that aidc barely uses — it manages its own users (vscode), PATH, git config, and toolchain wiring. Measured contribution to the 3.22 GB floor: ~596 MB (393 + 203 MB feature layers) plus the base ubuntu layer.
aidc only actually needs from the base image:
- a
vscode user + sudo
- git, curl, ca-certificates, common build basics
- a working apt
Proposal A: slimmer base image (recommended)
Evaluate switching the base to a slimmer image, e.g.:
ubuntu:24.04 (digest-pinned) + a small layer that creates the vscode user (uid 1000), installs sudo, git, curl, ca-certificates, and the handful of apt packages the Dockerfile already installs.
- Or
ghcr.io/devcontainers/base:ubuntu-24.04 → ubuntu:24.04 with the devcontainer feature layers dropped.
Expected saving: 400–600 MB off every image.
Proposal B (cheaper, still worth it): drop unused apt packages
Audit the apt list — candidates for removal/trimming:
build-essential (~150 MB with deps) — only needed if the project compiles C; make it part of toolchain installs or project-setup.sh instead of unconditional.
vim, nano, tmux, zsh, fzf, fd-find — nice-to-haves; consider keeping but documenting, or moving to an "interactive" build arg.
ipset, iptables, iproute2, dnsutils, socat, bubblewrap — needed for the firewall/clipboard features; keep.
- nodejs (from nodesource) — installed unconditionally; only needed when
AIDC_TOOLCHAINS includes node (or npm/pnpm/yarn/bun runtimes). Move to the toolchain block (~70 MB saving on non-node projects).
Keep the ones with real functions (gh, jq, ripgrep, rsync, unzip/xz/zip, gnupg, curl, ca-certificates).
Files
templates/devcontainer/Dockerfile.tmpl — FROM line + apt block
Acceptance criteria
- Base + apt + uv/python + agents + scanners image ≤ ~2.5 GB (from 3.22 GB) before any toolchain changes.
aidc up --clipboard (socat), firewall (iptables/ipset), and clipboard bridge still work.
vscode user, sudo, git config overlay all still function.
Problem
mcr.microsoft.com/devcontainers/base:ubuntu-24.04brings ~600 MB of devcontainer features (git feature 393 MB, common-utils 203 MB) that aidc barely uses — it manages its own users (vscode), PATH, git config, and toolchain wiring. Measured contribution to the 3.22 GB floor: ~596 MB (393 + 203 MB feature layers) plus the base ubuntu layer.aidc only actually needs from the base image:
vscodeuser + sudoProposal A: slimmer base image (recommended)
Evaluate switching the base to a slimmer image, e.g.:
ubuntu:24.04(digest-pinned) + a small layer that creates thevscodeuser (uid 1000), installssudo,git,curl,ca-certificates, and the handful of apt packages the Dockerfile already installs.ghcr.io/devcontainers/base:ubuntu-24.04→ubuntu:24.04with the devcontainer feature layers dropped.Expected saving: 400–600 MB off every image.
Proposal B (cheaper, still worth it): drop unused apt packages
Audit the apt list — candidates for removal/trimming:
build-essential(~150 MB with deps) — only needed if the project compiles C; make it part of toolchain installs or project-setup.sh instead of unconditional.vim,nano,tmux,zsh,fzf,fd-find— nice-to-haves; consider keeping but documenting, or moving to an "interactive" build arg.ipset,iptables,iproute2,dnsutils,socat,bubblewrap— needed for the firewall/clipboard features; keep.AIDC_TOOLCHAINSincludesnode(or npm/pnpm/yarn/bun runtimes). Move to the toolchain block (~70 MB saving on non-node projects).Keep the ones with real functions (gh, jq, ripgrep, rsync, unzip/xz/zip, gnupg, curl, ca-certificates).
Files
templates/devcontainer/Dockerfile.tmpl—FROMline + apt blockAcceptance criteria
aidc up --clipboard(socat), firewall (iptables/ipset), and clipboard bridge still work.vscodeuser, sudo, git config overlay all still function.