GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support selecting the container engine (docker or Apple Container) by fnando · Pull Request #2643 · stellar/stellar-cli

Conversation

@fnando

@fnando fnando commented Jul 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

What

Adds a --engine <docker|apple-container> flag (and STELLAR_CONTAINER_ENGINE env var) to stellar container start|stop|logs, letting users pick which container runtime the CLI shells out to. docker remains the default, so existing behavior is unchanged. Selecting apple-container runs Apple's container CLI (macOS 26+, Apple silicon) instead.

Because Apple's runtime has no host concept, --docker-host/DOCKER_HOST is now ignored for non-docker engines with an advisory warning rather than being silently passed through.

Implementation notes:

  • All engine-specific behavior is centralized in container/shared.rs: an Engine enum drives per-operation command builders (pull/run/stop/logs), so the only divergences live in one place — Apple uses container image pull and omits docker's --tail all.
  • Error messages are now engine-aware ("is container installed and on your PATH?").
  • stderr classification for "already running" / "not found" is per-engine; the Apple strings (already exists / not found) were confirmed against the real CLI.
  • Follow-up command hints from start carry --engine over; STELLAR_CONTAINER_ENGINE is registered in stellar env; and stellar doctor reports whether the effective engine is installed.

Apple Container

$ $stellar container start --engine apple-container --protocol-version 27
ℹ️ Starting local network
✅ Started container
🔎 Watch logs with `stellar container logs local --engine apple-container`
ℹ️ Stop the container with `stellar container stop local --engine apple-container`

$ container ls | grep stellar
stellar-local  docker.io/stellar/quickstart:testing  linux  arm64  running  192.168.64.7/24  4     1024 MB  2026-07-13T14:52:55Z

$ $stellar container logs --engine apple-container
Starting Stellar Quickstart
versions:
  quickstart: 16a57418b555ab859e133550c449ff15c2f5c06e
  xdr:
    stellar-xdr 27.0.0 (5262803470be965e42f80023d12fba12808c774a)
    xdr: 68fa1ac55692f68ad2a2ca549d0a283273554439
    features: <none>
  core:
    v27.0.0
    ledger protocol version: 27
    rust version: rustc 1.95.0 (59807616e 2026-04-14)
    soroban-env-host versions:
    ...

$ $stellar container stop --engine apple-container
ℹ️ Stopping local container
✅ Container stopped

$ container ls | grep stellar | wc -l
       0

Apple Container using STELLAR_CONTAINER_ENGINE

$ export STELLAR_CONTAINER_ENGINE=apple-container

$ $stellar container start --protocol-version 27
ℹ️ Starting local network
✅ Started container
🔎 Watch logs with `stellar container logs local --engine apple-container`
ℹ️ Stop the container with `stellar container stop local --engine apple-container`

$ container ls | grep stellar
stellar-local  docker.io/stellar/quickstart:testing  linux  arm64  running  192.168.64.8/24  4     1024 MB  2026-07-13T14:57:22Z

$ $stellar container stop
ℹ️ Stopping local container
✅ Container stopped

$ container ls | grep stellar | wc -l
       0

Docker

$ $stellar container start --protocol-version 27
ℹ️ Starting local network
ℹ️ testing: Pulling from stellar/quickstart
ℹ️ Digest: sha256:3b98cc624a235215bbb2dedd18bd3ec3a498053b6b6533533b6a0d94354a7885
ℹ️ Status: Image is up to date for stellar/quickstart:testing
✅ Started container
🔎 Watch logs with `stellar container logs local`
ℹ️ Stop the container with `stellar container stop local`

$ docker container ls | grep stellar
7412897d045d   stellar/quickstart:testing   "/start --local '--e…"   22 seconds ago   Up 22 seconds   5432/tcp, 6060-6061/tcp, 8002/tcp, 8100/tcp, 11625-11626/tcp, 0.0.0.0:8000->8000/tcp, [::]:8000->8000/tcp   stellar-local

$ $stellar container logs
Starting Stellar Quickstart
versions:
  quickstart: 16a57418b555ab859e133550c449ff15c2f5c06e
  xdr:
    stellar-xdr 27.0.0 (5262803470be965e42f80023d12fba12808c774a)
    xdr: 68fa1ac55692f68ad2a2ca549d0a283273554439
    features: <none>
  core:
    v27.0.0
    ...

$ $stellar container stop
ℹ️ Stopping local container
✅ Container stopped

$ docker container ls | grep stellar | wc -l
       0

stellar doctor

$ PATH=/Users/fnando/Projects/stellar/stellar-cli/target/debug stellar doctor 2>/dev/stdout | grep Container
⚠️ Container engine `docker` is not installed

$ STELLAR_CONTAINER_ENGINE=apple-container PATH=/Users/fnando/Projects/stellar/stellar-cli/target/debug stellar doctor 2>/dev/stdout | grep Container
⚠️ Container engine `apple-container` is not installed

$ STELLAR_CONTAINER_ENGINE=docker PATH=/Users/fnando/Projects/stellar/stellar-cli/target/debug stellar doctor 2>/dev/stdout | grep Container
⚠️ Container engine `docker` is not installed

$ STELLAR_CONTAINER_ENGINE=docker $stellar doctor 2>/dev/stdout | grep Container
⚠️ Container engine `docker` is not installed

$ STELLAR_CONTAINER_ENGINE=docker $stellar doctor 2>/dev/stdout | grep Container
✅ Container engine `docker` is available

$ STELLAR_CONTAINER_ENGINE=apple-container $stellar doctor 2>/dev/stdout | grep Container
✅ Container engine `apple-container` is available

Why

PR #2629 replaced the bollard Docker API client with direct docker CLI invocations. Now that we shell out to an external binary, supporting other docker-compatible runtimes is straightforward. Apple's container is the immediate target, giving macOS users a native-VM alternative without Docker Desktop.

Tested end-to-end against a real Apple container install: full start → logs → stop lifecycle, the host-ignored warning, engine-aware not-found error, and env-var selection all verified. Added a fake-engine-on-PATH integration suite (tests/it/container.rs, 9 tests) covering argv propagation, stderr mapping, engine selection, and the binary-missing error, plus unit tests for the builders and classifiers.

Known limitations

Apple's container requires macOS 26 on Apple silicon and, unlike docker, does not support remote hosts, so --docker-host is inert (with a warning) when that engine is selected.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI review requested due to automatic review settings July 13, 2026 15:20
@github-project-automation github-project-automation Bot added this to DevX Jul 13, 2026
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jul 13, 2026
Copilot started reviewing on behalf of fnando July 13, 2026 15:21
View session
@fnando fnando self-assigned this Jul 13, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Jul 13, 2026
@fnando
fnando requested review from leighmcculloch and mootz12 July 13, 2026 15:23
Copilot AI reviewed Jul 13, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for selecting which container runtime the CLI shells out to for stellar container start|stop|logs, defaulting to docker while enabling Apple’s container CLI via --engine apple-container or STELLAR_CONTAINER_ENGINE. The change centralizes engine-specific command building and stderr classification, and wires engine awareness into diagnostics and integration tests.

Changes:

  • Introduce an Engine enum and engine-aware command builders/classifiers for pull/run/stop/logs.
  • Add --engine <docker|apple-container> and STELLAR_CONTAINER_ENGINE, including host-ignored warnings for non-docker engines.
  • Extend stellar doctor, env var visibility, and integration tests to cover engine selection/argv propagation.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
FULL_HELP_DOCS.md Documents --engine for container commands (also includes an unrelated stellar xdr docs change).
cmd/soroban-cli/src/env_vars.rs Registers CONTAINER_ENGINE so STELLAR_CONTAINER_ENGINE is surfaced in env tooling.
cmd/soroban-cli/src/commands/doctor.rs Adds a doctor check to report whether the selected/default container engine binary is available.
cmd/soroban-cli/src/commands/container/stop.rs Switches to engine-aware stop command + engine-aware stderr mapping and host-ignored warnings.
cmd/soroban-cli/src/commands/container/start.rs Switches to engine-aware pull/run commands + engine-aware stderr mapping and host-ignored warnings.
cmd/soroban-cli/src/commands/container/shared.rs Implements Engine, engine resolution, engine-aware command builders, warnings, and unit tests.
cmd/soroban-cli/src/commands/container/mod.rs Exposes shared module within the crate for doctor integration.
cmd/soroban-cli/src/commands/container/logs.rs Uses engine-aware logs command and emits host-ignored warnings.
cmd/crates/soroban-test/tests/it/main.rs Registers new container integration test module on Unix.
cmd/crates/soroban-test/tests/it/container.rs Adds integration tests using fake engines on PATH to validate argv propagation and behavior.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread FULL_HELP_DOCS.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread cmd/crates/soroban-test/tests/it/container.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@fnando
fnando enabled auto-merge (squash) July 13, 2026 17:00
mootz12
mootz12 approved these changes Jul 16, 2026
View reviewed changes

@mootz12 mootz12 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One ask in-line.

Otherwise LG2M!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread cmd/soroban-cli/src/commands/doctor.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

fnando added 3 commits July 16, 2026 11:39
@fnando
Add --engine flag to pick docker or Apple Container.
6450568
@fnando
Cover Apple container error messages in tests.
bc619cd
@fnando
Warn in doctor when container engine is invalid.
4158028
@fnando
fnando force-pushed the container-engine-selection branch from 3658ab1 to 4158028 Compare July 16, 2026 15:00
@fnando
fnando merged commit 902eeb0 into main Jul 16, 2026
229 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@fnando
fnando deleted the container-engine-selection branch July 16, 2026 15:14
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@mootz12 mootz12 mootz12 approved these changes
@leighmcculloch leighmcculloch Awaiting requested review from leighmcculloch

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@fnando fnando

Labels

None yet

Projects

DevX
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@fnando @mootz12
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.