Add v3 host-backed container runtime foundations - #263
Draft
groundwater wants to merge 18 commits into
Draft
Conversation
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
ghost-containerguest CLI with stdin, native PTY allocation, terminal resize, exit propagation, and protocol v1 compatibilityArchitecture
The helper owns the macOS VM, shared vmnet network, endpoint allocation, guest filesystem bridge, and vsock container bridge. A single embedded
ghostvm-container-runtime.xpcservice hosts all container VMs for that helper and reconstructs the vmnet network from its serialized capability. Container runtime failure therefore does not terminate the macOS VM.Image preparation runs in the short-lived
ghostvm-image-fetchhelper. Guest bind mounts are exposed read-only through GhostTools, bridged over loopback to the sandboxed GhostVMFS extension, and mounted into the container VM.Guest CLI
Supported options in this slice:
-i,--interactive-t,--tty-it/-ti-v GUEST_PATH:CONTAINER_PATH:roTTY mode uses a native Containerization PTY, forwards
SIGWINCH, restores local terminal state on exit/signals, and preserves PTY bytes while normalizing host diagnostic newlines.Requirements
Verification
xcodebuild testpassed: 182 GhostVM testsswift testpassed: 103 GhostTools tests/bin/bashprompt throughghost-container run -itRemaining Validation
Scope
This establishes the v3 runtime foundations and one-shot container execution path. Persistent container lifecycle APIs, port publishing, environment forwarding, image builds, and a broader Docker-compatible adapter remain follow-up work.
Supersedes #262, whose base branch and
/usr/local/bin/containerarchitecture are obsolete.