Skip to content

Auto-latest tool versions, agentic AI CLIs, and a leaner faster image#9

Merged
jpwhite3 merged 4 commits into
mainfrom
develop
May 23, 2026
Merged

Auto-latest tool versions, agentic AI CLIs, and a leaner faster image#9
jpwhite3 merged 4 commits into
mainfrom
develop

Conversation

@jpwhite3

Copy link
Copy Markdown
Owner

Summary

This PR rolls up four commits on develop that together (a) make the image self-updating, (b) add agentic AI coding CLIs, (c) cut the image size by 27%, and (d) make CI rebuilds fast.

1. Dynamic tool versions (264a064)

No tool versions are pinned in the Dockerfile anymore. Each build resolves the latest available release at build time:

  • Go: https://go.dev/VERSION?m=text
  • nvm: GitHub releases API for nvm-sh/nvm
  • Node: nvm install --lts
  • Java: highest openjdk-N-jdk[-headless] from apt
  • .NET: highest dotnet-sdk-X.Y from apt
  • Rust: rustup stable
  • Docker: official Docker apt repo

The hardcoded …/node/v22.16.0/bin PATH entry is replaced with a stable $NVM_DIR/current symlink so version updates don't break PATH. Adds a weekly cron schedule and workflow_dispatch to the workflow so the image gets rebuilt periodically even without commits.

2. Agentic AI coding tools (ef5a534)

Adds a new ai-tools build stage that installs the latest releases of:

  • Claude Code (claude) — https://claude.ai/install.sh
  • Antigravity CLI (agy) — https://antigravity.google/cli/install.sh
  • Opencode (opencode) — https://opencode.ai/install

PATH updated to include /root/.local/bin and /root/.opencode/bin so all three are usable from any shell.

3. Image size and build speed (88050a5)

Measured: 4.81GB → 3.49GB (−27%). Cached local rebuilds: ~95s → ~1.4s.

  • BuildKit cache mounts on /var/cache/apt, /var/lib/apt, and /root/.cache/pip
  • Rust --profile minimal + clippy + rustfmt (drops rust-docs, ~700MB)
  • Docker CLI + buildx + compose only — no daemon/containerd (~600MB)
  • openjdk-N-jdk-headless instead of full JDK (~200MB)
  • Strip Go doc/, test/, api/ after install (~100MB)
  • .NET SDK only (the SDK ships its own runtime; ~50MB)
  • nvm cache clear after Node install
  • Combined ai-tools and final-stage RUN steps to reduce layer overhead

4. CI build caching (5eff249)

Workflow now uses docker/build-push-action@v5 with cache-from: type=gha and cache-to: type=gha,mode=max so BuildKit layer caches persist across CI runs (free, repo-scoped, no extra registry auth needed). Also:

  • Bumps actions/checkout to v4
  • Adds explicit docker/setup-buildx-action@v3 and docker/login-action@v3
  • test job now runs on pull_request events as well as develop pushes, so PRs to main get a full build verification

Test plan

  • Local clean build green: make build (6m31s on Mac under emulation, 3.49GB)
  • Local cached rebuild green: 1.4s (everything CACHED)
  • All tool version probes pass in the in-image verification step
  • All three AI CLIs found on PATH (claude, opencode, agy)
  • CI test build green on develop (run 26341183134)
  • CI test build green for this PR
  • Publish job runs cleanly on merge to main (will republish :latest)

Made with Cursor

jpwhite3 and others added 4 commits May 23, 2026 14:37
Replaces hardcoded versions for Go, nvm, Node, Java (openjdk-25-jdk),
and .NET (dotnet-sdk-8.0) with discovery steps so each build pulls the
latest available release:

- Go: queries https://go.dev/VERSION?m=text
- nvm: queries the GitHub releases API for the latest tag
- Node: nvm install --lts + nvm alias default 'lts/*'
- Java: highest openjdk-N-jdk found via apt-cache pkgnames
- .NET: highest dotnet-sdk-X.Y found via apt-cache pkgnames

Also replaces the brittle hardcoded /root/.nvm/versions/node/v22.16.0/bin
PATH entry with a stable /root/.nvm/current symlink that gets repointed
to the freshly installed Node version, and enables pipefail in the
bash SHELL so curl|bash failures fail the build.

Adds a weekly cron schedule and workflow_dispatch trigger to the Docker
workflow so the image actually gets rebuilt periodically with the
latest tool versions, not just on push.

README.md tool version table is auto-updated by make build (Node 24.16.0,
Java 25.0.2, Dotnet 10.0.107, Go 1.26.3, Rust 1.95.0, Docker 29.5.2).

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds a new ai-tools build stage that installs the latest releases of
Claude Code (`claude`), Antigravity CLI (`agy`), and Opencode (`opencode`)
from their official curl|bash installers. Mirrors /root/.local/bin and
/root/.opencode/bin into the image PATH so all three are usable from
any shell.

Updates README.md to make explicit that no tool versions are pinned
in the Dockerfile, document how "latest" is resolved per tool
(including the new AI CLIs), and clarify that the auto-generated
version table reflects the most recent build.

Co-authored-by: Cursor <cursoragent@cursor.com>
Measured: 4.81GB -> 3.49GB (-27%); cached rebuild 95s -> 1.4s.

- BuildKit cache mounts on /var/cache/apt, /var/lib/apt, and pip cache
- Rust --profile minimal + clippy + rustfmt (drops rust-docs, ~700MB)
- Docker CLI + buildx + compose only via Docker's apt repo (~600MB)
- openjdk-N-jdk-headless instead of full JDK (~200MB)
- Strip Go doc/test/api dirs (~100MB)
- .NET SDK only (drops redundant dotnet-runtime package)
- nvm cache clear after Node install
- Combine ai-tools and final-stage RUN steps to reduce layer overhead

Co-authored-by: Cursor <cursoragent@cursor.com>
Replaces raw `docker build` and `make build` calls in the workflow with
docker/build-push-action@v5 and enables type=gha cache-from/cache-to so
BuildKit layer caches persist across CI runs. This brings CI rebuild
times in line with the local cache-mount speedup (~95s -> ~seconds when
the cache is warm).

Other workflow improvements:
- Bumps actions/checkout to v4
- Adds explicit docker/setup-buildx-action@v3 and docker/login-action@v3
- Tightens the publish job to packages:write only and removes the test
  job's reliance on `make build` (the README auto-update step inside
  make build is a no-op on CI since CI never commits)
- test job now also runs on pull_request events so PRs to main get a
  full build verification before merge

Co-authored-by: Cursor <cursoragent@cursor.com>
@jpwhite3 jpwhite3 merged commit 17217a1 into main May 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant