Skip to content

Conversation

@jmgilman
Copy link
Collaborator

@jmgilman jmgilman commented Jan 3, 2026

Summary

  • Add Docker as a container runtime option alongside Apple Containerization and Podman
  • Add comprehensive integration tests using the testscript framework
  • Add three CI workflows for multi-platform testing

Changes

Docker Runtime

  • New Docker container runtime implementation
  • Supports rootless Docker via DOCKER_HOST environment variable

Integration Tests

Six test scripts covering core CLI functionality:

  • version.txtar - basic version command
  • config.txtar - configuration viewing and setting
  • auth_status.txtar - auth status checking (macOS only)
  • run_detached.txtar - full instance lifecycle
  • kill.txtar - session termination
  • recreate.txtar - container recreation

CI Workflows

  • integration-linux-x86.yml - Linux x86_64 with Docker (WarpBuilds)
  • integration-linux-arm64.yml - Linux ARM64 with Docker (WarpBuilds)
  • integration-macos-arm64.yml - macOS ARM64 with Apple Containerization (WarpBuilds)

Local Testing

just integration-test          # auto-detect runtime
just integration-test-apple    # Apple Containerization
just integration-test-docker   # Docker
just integration-test-lima     # Linux ARM64 via Lima VM
just integration-test-one <script>  # single test

Test plan

  • All integration tests pass on macOS (Apple Containerization)
  • All integration tests pass on Linux ARM64 (Docker via Lima)
  • CI workflows pass on all three platforms

🤖 Generated with Claude Code

jmgilman and others added 2 commits January 2, 2026 22:07
Add Docker as a third container runtime alongside Podman and Apple
Containerization. The implementation follows the existing baseRuntime
pattern with a Docker-specific parser for handling Docker's NDJSON
output format from `docker ps --format json`.

Changes:
- Add docker.go with runtime implementation and NDJSON parser
- Add comprehensive test suite in docker_test.go
- Update config validation to accept "docker" as runtime.name
- Add RuntimeDocker constant to instance package
- Update root.go with Docker selection logic
- Update documentation across 9 files to include Docker

Configuration:
  runtime:
    name: docker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive integration tests using go-internal/testscript:

Tests:
- version.txtar: basic version command
- config.txtar: config viewing and setting
- auth_status.txtar: auth status checking (macOS only, skipped on Linux)
- run_detached.txtar: full instance lifecycle (create, ps, stop, rm)
- kill.txtar: session termination
- recreate.txtar: container recreation

CI Workflows:
- integration-linux-x86.yml: Linux x86_64 with Docker (WarpBuilds)
- integration-linux-arm64.yml: Linux ARM64 with Docker (WarpBuilds)
- integration-macos-arm64.yml: macOS ARM64 with Apple Containerization (WarpBuilds)

Local testing:
- just integration-test: run tests with auto-detected runtime
- just integration-test-apple: run with Apple Containerization
- just integration-test-docker: run with Docker
- just integration-test-lima: run Linux tests in ephemeral Lima VM
- just integration-test-one <script>: run single test script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 3, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
headjack 2c3fb7b Commit Preview URL

Branch Preview URL
Jan 03 2026, 07:39 PM

jmgilman and others added 6 commits January 3, 2026 10:13
…arpBuilds)

WarpBuilds macOS runners don't have Apple Containerization installed.
Switch to Docker for CI consistency across all platforms.

Apple Containerization can still be tested locally with:
  just integration-test-apple

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The docker/setup-docker-action doesn't exist.
Use Homebrew to install Docker CLI and Colima for container runtime.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ble)

WarpBuilds macOS runners don't support:
- Apple Containerization (not installed)
- Colima/Lima VMs (VZ framework fails in CI)

macOS integration tests can still be run locally:
  just integration-test-apple

Linux integration tests (x86 and ARM64) run in CI using Docker.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Address code review findings:
- Fix wait_running to use ts.MkAbs(".") to get current directory
  (testscript's cd command doesn't update PWD environment variable)
- Replace fixed sleep calls with wait_running for more reliable tests
- Make auth_status test accept either "configured" or "not configured"
  to handle machines with existing credentials
- Use unique repo names per test to avoid parallel test conflicts
- Fix DefaultBaseImage registry from jmgilman to gilmanlab

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add io.headjack.docker.flags label support for Docker runtime
  (previously only Podman and Apple flags were read from image labels)
- Fix auth_status test to match actual command output:
  "not configured", "subscription", "api key", or "configured"
- Remove cleanup_containers from parallel tests to prevent race conditions
  (each test now uses unique repo names so cleanup isn't needed)
- Add unit tests for Docker flags extraction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- setupTestEnv now tries exec.LookPath("hjk") if HJK_BINARY is not set
- wait_running fails early with helpful error if binary not found
- Allows running tests without justfile if hjk is in PATH

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman jmgilman merged commit 0d575de into master Jan 3, 2026
4 checks passed
@jmgilman jmgilman deleted the feat/docker-runtime branch January 3, 2026 19:48
jmgilman added a commit that referenced this pull request Jan 3, 2026
Current behavior:
Only Podman and Apple Containerization were supported as container runtimes

New behavior:
Docker is now available as a third container runtime option with full feature parity including image label flags support. Comprehensive integration test suite added using testscript framework with CI workflows for Linux x86 and ARM64.

Closes: #37
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.

2 participants