feat: make Docker (DinD/DoD) optional via INSTALL_DOCKER build arg#25
Merged
Conversation
Add INSTALL_DOCKER build arg (default true) to the base image so the
Docker CLI + Compose plugin (Docker-outside-of-Docker, via a bind-mounted
host socket) can be omitted entirely. The arg lives on the base and
propagates to every variant through FROM.
CI now builds every image in two flavors via a doubled matrix in both
build.yml and check.yml:
- base job runs 2 matrix jobs (docker + no-docker)
- variants job runs 10 (5 variants x {docker, no-docker})
- no-docker images publish with a -nodocker tag suffix (metadata-action
flavor suffix, onlatest=true so :latest-nodocker never clobbers :latest)
- parallel -nodocker GHA cache scopes (base-nodocker, bun-nodocker, ...)
- flutter no-docker chain preserved: no-docker base -> VNC -> flutter
Docs (README, CLAUDE.md, devcontainer-claude.md) updated: Images table
lists both flavors, Build Arguments documents INSTALL_DOCKER, CI/CD notes
reflect the doubled matrix and new cache scopes.
Also removes unused devcontainer tooling that was already staged on this
branch: Context7 MCP + suggestion hook, gstack skills, and the ~/.claude
home-merge mechanism (merge-claude-home.sh).
❌ Tool Verification: baseClick to expand verification output |
❌ Tool Verification: base-nodockerClick to expand verification output |
✅ Tool Verification: base-nodockerClick to expand verification output |
✅ Tool Verification: baseClick to expand verification output |
✅ Tool Verification: base-nodockerClick to expand verification output |
✅ Tool Verification: baseClick to expand verification output |
✅ Tool Verification: trixie-vnc-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-bun-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-php-nvm-uv-claude-nodockerClick to expand verification output |
✅ Tool Verification: trixie-vnc-nvm-uv-claude-nodockerClick to expand verification output |
✅ Tool Verification: trixie-rust-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-rust-nvm-uv-claude-nodockerClick to expand verification output |
The variant builds (php, bun, rust, flutter) were exhausting GitHub runner disk during image export/load. Two root causes addressed: - headroom-ai[all] pulled torch + ~2.5GB of bundled CUDA libs (the 3.4GB layer), plus onnxruntime/opencv/sentence-transformers via image/evals/ memory extras. Narrowed to [code,mcp,proxy], which keeps tree-sitter code analysis, MCP, and the proxy server (CPU-only onnxruntime/transformers/ magika, ~500-700MB) with no torch/CUDA. Removed from the base image, so every variant shrinks by ~2.5GB+. - Dropped the full Android Studio IDE (~2-3GB) from the flutter image; flutter/Android builds use the SDK (cmdline-tools, platform-tools, build-tools) installed via sdkmanager. Also expanded the variants' "Free disk space" CI step (full ghcup/ hostedtoolcache/swift removal + swapoff) for headroom margin. Docs/scripts: README drops the Android Studio bullet; validate-flutter- runtime.sh Section 4 skips the IDE-launch check (manual script, not CI).
✅ Tool Verification: base-nodockerClick to expand verification output |
The pkgs.k8s.io apt repo intermittently 403s on CI runners (transient CDN rate-limiting) when fetching Release.key, non-deterministically failing the base image build — it broke the docker base while the no-docker base passed in the same run. Switch to the canonical static binary from dl.k8s.io with --retry-all-errors (retries 4xx, not just 5xx/transport), removing the apt repo, GPG key, and apt-get update round-trips entirely.
✅ Tool Verification: base-nodockerClick to expand verification output |
✅ Tool Verification: baseClick to expand verification output |
✅ Tool Verification: trixie-bun-nvm-uv-claude-nodockerClick to expand verification output |
✅ Tool Verification: trixie-bun-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-vnc-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-php-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-php-nvm-uv-claude-nodockerClick to expand verification output |
✅ Tool Verification: trixie-vnc-nvm-uv-claude-nodockerClick to expand verification output |
✅ Tool Verification: trixie-rust-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-rust-nvm-uv-claude-nodockerClick to expand verification output |
✅ Tool Verification: trixie-vnc-flutter-rust-nvm-uv-claudeClick to expand verification output |
✅ Tool Verification: trixie-vnc-flutter-rust-nvm-uv-claude-nodockerClick to expand verification output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the Docker CLI + Compose plugin (Docker-outside-of-Docker, via a bind-mounted host socket) optional through a new
INSTALL_DOCKERbuild arg on the base image (defaulttrue, so existing images are unchanged). Because the arg lives on the base and every variant buildsFROMit, this controls all images.CI now publishes two flavors of every image:
:latest,:<version>:latest-nodocker,:<version>-nodockerChanges
base/Dockerfile—ARG INSTALL_DOCKER=truegates the Docker apt repo and thedocker-ce-cli/docker-compose-pluginpackages (POSIXifinsideRUN;gh/stripestill install). Thedockergroup + socket-fix entrypoint stay (inert without the CLI)..github/workflows/build.yml/check.yml— doubled matrix: base runs 2 jobs (docker + no-docker), variants run 10 (5 × {docker, no-docker}).INSTALL_DOCKERis passed to the base/VNC rebuild steps;-nodockertag suffix viametadata-actionflavor (onlatest=true); parallel-nodockerGHA cache scopes. Flutter no-docker chain preserved (no-docker base → VNC → flutter).INSTALL_DOCKER, CI/CD notes +CLAUDE.mdreflect the doubled matrix and new cache scopes.~/.claudehome-merge mechanism.CI disk exhaustion fix + image slimming
The doubled matrix surfaced
No space left on devicefailures in the variant builds (php, bun, rust, flutter) — GitHub runners (~14 GB free) ran out during image export/load. Investigation of the run logs traced it to two oversized layers, now trimmed:headroom-ai[all]→headroom-ai[code,mcp,proxy](scripts/setup-claude.sh):[all]pulledtorch+ ~2.5 GB of bundled CUDA libs (the 3.4 GB layer), plus onnxruntime/opencv/sentence-transformers via theimage/evals/memoryextras. The retained extras keep tree-sitter code analysis, MCP, and the proxy server (CPU-only onnxruntime/transformers/magika, ~500–700 MB) with no torch/CUDA. Lives in the base image, so all 5 variants shrink by ~2.5 GB+.cmdline-tools,platform-tools,build-tools) installed viasdkmanager; install the IDE at runtime if GUI dev over VNC is needed.ghcup/hostedtoolcache/swiftremoval +swapoff+apt-get cleanfor headroom margin.validate-flutter-runtime.shSection 4 now skips the IDE-launch check (manualdocker execscript, not wired into CI;verify-tools.shnever checked Android Studio).Test plan
check.ymlpasses on this PR (builds + verifies all 12 images, posts per-image verification comments)No space left on devicedocker build --build-arg INSTALL_DOCKER=false -f base/Dockerfile .produces an image withoutdocker, withgh/stripeintact:latestunchanged)headroomCLI works (proxy/code/mcp) in the built image; notorch/CUDA presentflutter build/flutter testwork on the flutter image without Android Studiokubectl install reliability
base/Dockerfile— kubectl now installs from its official static binary (dl.k8s.io/release/<v1.32>/bin/linux/$ARCH/kubectl) withcurl --retry-all-errorsinstead of thepkgs.k8s.ioapt repo. That repo'sRelease.keyfetch intermittently returns 403 on CI runners (CDN rate-limiting), which non-deterministically failed the base build (broke the docker base while the no-docker base passed in the same run). Removes the apt repo, GPG key, andapt-get updateround-trips.