Sylin.Koan.Orchestration.Connector.Docker
0.17.0
dotnet add package Sylin.Koan.Orchestration.Connector.Docker --version 0.17.0
NuGet\Install-Package Sylin.Koan.Orchestration.Connector.Docker -Version 0.17.0
<PackageReference Include="Sylin.Koan.Orchestration.Connector.Docker" Version="0.17.0" />
<PackageVersion Include="Sylin.Koan.Orchestration.Connector.Docker" Version="0.17.0" />
<PackageReference Include="Sylin.Koan.Orchestration.Connector.Docker" />
paket add Sylin.Koan.Orchestration.Connector.Docker --version 0.17.0
#r "nuget: Sylin.Koan.Orchestration.Connector.Docker, 0.17.0"
#:package Sylin.Koan.Orchestration.Connector.Docker@0.17.0
#addin nuget:?package=Sylin.Koan.Orchestration.Connector.Docker&version=0.17.0
#tool nuget:?package=Sylin.Koan.Orchestration.Connector.Docker&version=0.17.0
Koan.Orchestration.Connector.Docker
✅ Validated against availability probes, compose lifecycle orchestration, and port parsing on 2025-09-29. See
TECHNICAL.mdfor full flows, component map, and edge-case coverage.
Docker implementation of IHostingProvider, used by the Koan CLI and orchestration tooling to manage Compose-based environments.
Capabilities
- Detect Docker availability (
docker version --format '{{.Server.Version}}'). - Start stacks with
docker compose up, waiting for all services to reach a healthy state within the configured timeout. - Stop and optionally prune volumes via
docker compose down. - Stream logs, capture service status, and enumerate live port bindings for downstream endpoint formatting.
- Surface engine metadata (server version, current context) for diagnostics and provider election.
Quick verification
# From repo root, run the Koan CLI doctor command against the Docker provider
dotnet run --project src/Koan.Orchestration.Cli -- doctor --engine docker --json
# Bring up a compose plan (non-prod) and watch readiness handling
dotnet run --project src/Koan.Orchestration.Cli -- up --engine docker --dry-run --explain
If Docker is reachable, doctor reports available=true and the engine block lists the detected server version and context.
Programmatic usage
var provider = new DockerProvider();
var availability = await provider.IsAvailableAsync();
if (availability.Ok)
{
await provider.Up(".Koan/compose.yml", Profile.Local, new RunOptions(Detach: true, ReadinessTimeout: TimeSpan.FromSeconds(60)));
var status = await provider.Status(new StatusOptions(Service: null));
var ports = await provider.LivePorts();
await provider.Down(".Koan/compose.yml", new StopOptions(RemoveVolumes: false));
}
RunOptions.Detachcontrols whetherdocker compose upreturns immediately or attaches to service output.RunOptions.ReadinessTimeoutensures the call fails if containers never reachrunning/healthy.StopOptions.RemoveVolumesmaps todocker compose down -v.
Edge cases to watch
- Docker CLI may emit NDJSON; parsers tolerate both NDJSON and array outputs.
- Informational stderr output is expected even on success—only exit codes are treated as failures.
- IPv6 bindings (
:::8080->80/tcp) are parsed and normalized before returningPortBindingrecords. - When the CLI is missing, status/logs fall back quietly while
IsAvailableAsyncdelivers a helpful reason string.
Related docs
Koan.Orchestration.Cli– commands using this provider.Koan.Orchestration.Connector.Podman– sibling provider for Podman engines./docs/engineering/index.md,/docs/architecture/principles.md– orchestration design principles.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 0.17.0 && < 0.18.0)
- Sylin.Koan.Orchestration.Abstractions (>= 0.17.0 && < 0.18.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sylin.Koan.Orchestration.Connector.Docker:
| Package | Downloads |
|---|---|
|
Sylin.Koan.Orchestration.Cli.Core
Core orchestration logic for the Koan CLI: app discovery, manifest assembly, compose generation, and provider election. Shared with the CLI front-end (Koan.Orchestration.Cli) and consumable by tooling that builds on the same primitives. |
GitHub repositories
This package is not used by any popular GitHub repositories.
See release notes: https://github.com/sylin-labs/Koan-framework/releases