Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit ebb321c

Browse files
jmgilmanclaude
andauthored
refactor(container): remove Apple Containerization support (#50)
* refactor(container): remove Apple Containerization support Current behavior: Headjack supported three container runtimes: Docker, Podman, and Apple Containerization Framework. Apple Containerization required macOS 26+ and used the `container` CLI binary. New behavior: Headjack now supports only Docker and Podman runtimes. All Apple Containerization code, tests, and documentation references have been removed. ADR-002 is preserved with "Superseded" status for historical context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(container): remove remaining Apple Containerization references Current behavior: Several files still contained Apple Containerization references after the initial removal commit. New behavior: - justfile: Remove apple auto-detection and integration-test-apple target - ADR-002: Update addendum to reflect runtime evolution and removal - Design docs: Remove Apple from runtime support tables and diagrams - Code comments: Update to show Docker/Podman only - Dockerfile: Update iptables workaround comment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(container): update listArgs comment to remove Apple reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: remove Apple reference from gocontainer --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4d63859 commit ebb321c

27 files changed

+60
-921
lines changed

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ homebrew_casks:
7676
ids:
7777
- darwin
7878
caveats: |
79-
Headjack requires a container runtime (Podman, Docker, or Apple Container).
79+
Headjack requires a container runtime (Podman, Docker).
8080
Get started: hjk auth claude && hjk run feat/my-feature --agent claude "Your task"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Full documentation is available at [headjack.gilman.io](https://headjack.gilman.
4949
## Requirements
5050

5151
- macOS or Linux
52-
- [Docker](https://www.docker.com/) (default), [Podman](https://podman.io/), or Apple Containerization (macOS 26+)
52+
- [Docker](https://www.docker.com/) (default) or [Podman](https://podman.io/)
5353
- Git
5454

5555
## License

docs/designs/devcontainer-integration.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This document describes the design for integrating devcontainer support into Hea
1010

1111
Headjack uses a layered architecture for container management:
1212

13-
1. **Runtime Interface** (`internal/container/container.go`): Abstracts container operations (Run, Exec, Stop, etc.) across Docker, Podman, and Apple Containerization
13+
1. **Runtime Interface** (`internal/container/container.go`): Abstracts container operations (Run, Exec, Stop, etc.) across Docker and Podman
1414
2. **Instance Manager** (`internal/instance/manager.go`): Orchestrates instance lifecycle, creating worktrees, containers, and managing sessions
1515
3. **Image Labels**: Runtime configuration is extracted from OCI image labels (`io.headjack.init`, `io.headjack.podman.flags`, etc.)
1616
4. **Configuration Merging**: Flags from config files take precedence over image labels
@@ -83,9 +83,6 @@ The devcontainer CLI supports Docker and Podman via the `--docker-path` flag:
8383
|---------|-----------|-------|
8484
| Docker || Native support |
8585
| Podman || Via `--docker-path podman` |
86-
| Apple Containerization || Not Docker-compatible |
87-
88-
Attempting to use devcontainer mode with Apple Containerization will result in an error.
8986

9087
### RunConfig Extension
9188

@@ -103,7 +100,7 @@ type RunConfig struct {
103100
}
104101
```
105102

106-
- Vanilla runtimes (Docker, Podman, Apple) ignore `WorkspaceFolder`
103+
- Vanilla runtimes (Docker, Podman) ignore `WorkspaceFolder`
107104
- `DevcontainerRuntime` uses `WorkspaceFolder` and ignores `Image`
108105

109106
### DevcontainerRuntime Implementation
@@ -237,11 +234,10 @@ This matches user expectations from VS Code, GitHub Codespaces, and DevPod.
237234
│ CLI Layer (cmd/run.go) │
238235
│ │ │
239236
│ ├── --image flag passed? │
240-
│ │ └── Yes: Use vanilla runtime (Docker/Podman/Apple)
237+
│ │ └── Yes: Use vanilla runtime (Docker/Podman)
241238
│ │ │
242239
│ └── devcontainer.json exists? │
243-
│ ├── Yes + Docker/Podman: Use DevcontainerRuntime │
244-
│ ├── Yes + Apple: Error (not supported) │
240+
│ ├── Yes: Use DevcontainerRuntime │
245241
│ └── No: Use vanilla runtime with default image │
246242
│ │
247243
│ Instance Manager receives containerRuntime interface │

docs/docs/decisions/adr-002-apple-containerization.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ description: Decision to use Apple Containerization Framework for agent isolatio
88

99
## Status
1010

11-
Accepted
11+
Superseded
12+
13+
:::info Supersession Note
14+
Apple Containerization support was removed from Headjack. The project now supports only Docker and Podman runtimes for cross-platform compatibility. This ADR is preserved for historical context.
15+
:::
1216

1317
## Context
1418

@@ -82,20 +86,19 @@ Use **Apple Containerization Framework** as the isolation technology for Headjac
8286
- By adopting early, we participate in the framework's growth through usage and bug reports
8387
- The iptables-legacy workaround for Docker-in-Docker is stable but adds base image complexity
8488

85-
## Addendum: Multi-Runtime Support
89+
## Addendum: Runtime Evolution
90+
91+
This ADR originally established Apple Containerization Framework as the isolation technology. After further development, Headjack evolved to support multiple runtimes and eventually removed Apple Containerization support in favor of Docker and Podman for cross-platform compatibility.
8692

87-
While Apple Containerization Framework remains the recommended runtime for its superior isolation properties, Headjack now supports multiple container runtimes to accommodate different user preferences and environments:
93+
Current supported runtimes:
8894

8995
| Runtime | Configuration | Binary | Notes |
9096
|---------|--------------|--------|-------|
9197
| Docker | `runtime.name: docker` | `docker` | Default runtime. Cross-platform, widely available. |
92-
| Apple | `runtime.name: apple` | `container` | Recommended for macOS 26+. VM-level isolation. |
9398
| Podman | `runtime.name: podman` | `podman` | Daemonless alternative. |
9499

95100
Users can configure their preferred runtime via:
96101

97102
```bash
98103
hjk config runtime.name docker
99104
```
100-
101-
This flexibility allows teams to use familiar tooling while still benefiting from Headjack's instance and session management.

docs/docs/decisions/adr-003-go-language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Use **Go** as the implementation language for Headjack.
6969

7070
- **Verbosity**: More boilerplate than scripting languages
7171
- **Error handling**: Explicit error checking adds code volume
72-
- **No Apple Containerization SDK**: Must shell out regardless (not a Go-specific limitation)
72+
- **No container CLI SDK**: Must shell out to Docker/Podman CLI (not a Go-specific limitation)
7373

7474
### Neutral
7575

docs/docs/decisions/adr-005-no-gpg-support.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ Accepted
1212

1313
## Context
1414

15-
Developers commonly use GPG to sign git commits. When running agents in isolated Apple Containerization instances, the host's GPG keys and agent are not directly accessible.
15+
Developers commonly use GPG to sign git commits. When running agents in isolated container instances, the host's GPG keys and agent are not directly accessible.
1616

1717
We investigated two approaches to enable GPG signing from within containers:
1818

1919
### Option 1: GPG Agent Forwarding via TCP Bridge
2020

21-
GPG agent forwarding works by proxying the host's `gpg-agent` socket into the container. However, Unix sockets don't cross VM boundaries (each Apple Container is a separate VM).
21+
GPG agent forwarding works by proxying the host's `gpg-agent` socket into the container. This requires mounting the socket into the container.
2222

23-
A workaround exists using `socat` to bridge Unix socket → TCP on the host, then TCP → Unix socket in the container. This was validated empirically and works, including with hardware tokens (Yubikey).
23+
A TCP bridge approach using `socat` to bridge Unix socket → TCP on the host, then TCP → Unix socket in the container was validated empirically and works, including with hardware tokens (Yubikey).
2424

2525
**Complexity:**
2626
- Requires `socat` installed on host

docs/docs/decisions/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ An Architecture Decision Record (ADR) is a document that captures an important a
1717
| ADR | Title | Status |
1818
|-----|-------|--------|
1919
| [ADR-001](./adr-001-macos-only) | Initial macOS-Only Platform Support | Superseded |
20-
| [ADR-002](./adr-002-apple-containerization) | Apple Containerization Framework | Accepted |
20+
| [ADR-002](./adr-002-apple-containerization) | Apple Containerization Framework | Superseded |
2121
| [ADR-003](./adr-003-go-language) | Go as Implementation Language | Accepted |
2222
| [ADR-004](./adr-004-cli-agents) | CLI-Based Agents over API-Based | Accepted |
2323
| [ADR-005](./adr-005-no-gpg-support) | Defer GPG Commit Signing Support | Accepted |
@@ -27,7 +27,7 @@ An Architecture Decision Record (ADR) is a document that captures an important a
2727

2828
These decisions reflect several key themes in Headjack's design:
2929

30-
- **Simplicity over generality**: initial single-platform scope (macOS), OCI images only, CLI agents only
31-
- **Leverage existing ecosystems**: Apple Containerization, Go CLI patterns, standard OCI tooling
30+
- **Simplicity over generality**: OCI images only, CLI agents only
31+
- **Leverage existing ecosystems**: Docker/Podman, Go CLI patterns, standard OCI tooling
3232
- **Defer complexity**: GPG support deferred, Nix support left to users
3333
- **Optimize for the common case**: Subscription-based agents, opinionated base images

docs/docs/explanation/image-customization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: OCI images approach vs alternatives like Nix
66

77
# Image Customization
88

9-
Headjack runs agents in containers, and those containers need the right tools installed. How do you customize the environment when your project needs specific languages, frameworks, or system packages? Headjack answers this with standard OCI images, delegating all customization to Docker, Podman, or Apple Container tooling you already know.
9+
Headjack runs agents in containers, and those containers need the right tools installed. How do you customize the environment when your project needs specific languages, frameworks, or system packages? Headjack answers this with standard OCI images, delegating all customization to Docker or Podman tooling you already know.
1010

1111
## The Customization Problem
1212

docs/docs/how-to/build-custom-image.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ hjk run feat/auth --base ghcr.io/gilmanlab/headjack:dind
2727

2828
### Prerequisites
2929

30-
- Docker, Podman, or Apple Container installed
30+
- Docker or Podman installed
3131
- Familiarity with Dockerfile syntax
3232

3333
### Create a Dockerfile
@@ -85,7 +85,7 @@ podman build -t my-custom-headjack:latest -f Dockerfile.headjack .
8585

8686
### Build for multiple architectures
8787

88-
For teams with both Intel and Apple Silicon Macs (using Docker buildx):
88+
For teams with both Intel and ARM Macs (using Docker buildx):
8989

9090
```bash
9191
docker buildx build \

docs/docs/how-to/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ This guide is being written. Check back soon!
1212

1313
## Prerequisites
1414

15-
- macOS or Linux (Apple Containerization requires macOS 26+)
15+
- macOS or Linux
1616
- Git
17-
- Container runtime (Docker, Podman, or Apple Container)
17+
- Container runtime (Docker or Podman)
1818

1919
## Installation Steps
2020

0 commit comments

Comments
 (0)