Docker API
Generated public TypeScript reference for @relkit/docker.
Common APIs
For configuration and examples, read bindings, docker, integrations.
For a complete workflow, follow upload product images, cache product prices.
Most-used APIs
These entries carry each API’s contract and example. The complete reference follows.
docker
Selects an adapter’s declared local recipe without contacting Docker.
Example
import { docker } from "@relkit/docker";
import { redis } from "@relkit/redis";
const cache = docker(redis());
Signature
declare const docker: <const Adapter extends ProviderAdapter>(
adapter: Adapter,
) => LocalProviderSource<Adapter>;
Since v0.2.0
Complete reference
Public imports
@relkit/docker— 1 exports@relkit/docker/runtime— 16 exports
All exported APIs
Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API’s inline sample, a maintained repository usage, or the shared module walkthrough.
| API | Kind | Import from | Example |
|---|---|---|---|
| createDockerClient | Value | @relkit/docker/runtime |
Source example |
| createDockerMaterializer | Value | @relkit/docker/runtime |
Source example |
| docker | Value | @relkit/docker |
API example |
| DockerClient | Type | @relkit/docker/runtime |
Source example |
| DockerClientOptions | Type | @relkit/docker/runtime |
Module example |
| DockerCommandOptions | Type | @relkit/docker/runtime |
Module example |
| DockerCommandRequest | Type | @relkit/docker/runtime |
Module example |
| DockerCommandResult | Type | @relkit/docker/runtime |
Module example |
| DockerCommandRunner | Type | @relkit/docker/runtime |
Module example |
| DockerContainer | Type | @relkit/docker/runtime |
Module example |
| DockerEngineError | Value | @relkit/docker/runtime |
Module example |
| DockerEngineErrorCode | Type | @relkit/docker/runtime |
Module example |
| DockerEngineInfo | Type | @relkit/docker/runtime |
Module example |
| DockerHealthOptions | Type | @relkit/docker/runtime |
Module example |
| dockerMaterializer | Value | @relkit/docker/runtime |
Module example |
| DockerVolume | Type | @relkit/docker/runtime |
Module example |
| randomLoopbackPort | Value | @relkit/docker/runtime |
Module example |
docker-client.ts
createDockerClient
Signature
declare const createDockerClient: (options?: DockerClientOptions) => DockerClient;
randomLoopbackPort
Signature
declare const randomLoopbackPort: (containerPort: number) => string;
docker-composite-support.ts
argument
Signature
declare const argument: (value: string) => string;
bindMountArguments
Signature
declare const bindMountArguments: (
mounts: readonly LocalServiceBindMount[] | undefined,
) => string[];
compositeLabels
Signature
declare const compositeLabels: (values: Readonly<Record<string, string>>) => string[];
compositeSignal
Signature
declare const compositeSignal: (request: LocalServiceStartRequest) => {
readonly signal?: AbortSignal;
};
environmentArguments
Signature
declare const environmentArguments: (
values: Readonly<Record<string, string>> | undefined,
) => string[];
healthArgs
Signature
declare const healthArgs: (
command: readonly string[],
interval: number,
timeout: number,
retries: number,
) => string[];
inspectNetwork
Signature
declare const inspectNetwork: (
client: DockerClient,
networkName: string,
request: LocalServiceStartRequest,
) => Promise<Readonly<Record<string, string>> | undefined>;
mountPath
Signature
declare const mountPath: (value: string) => string;
owned
Signature
declare const owned: (
actual: Readonly<Record<string, string>>,
expected: Readonly<Record<string, string>>,
) => boolean;
positive
Signature
declare const positive: (value: number) => number;
resourceName
Signature
declare const resourceName: (value: string) => void;
volumeNames
Signature
declare const volumeNames: (
serviceName: string,
requested: Readonly<Record<string, string>> | undefined,
recipe: NormalizedLocalServiceRecipe,
) => Readonly<Record<string, string>>;
docker-composite-unit.ts
reusedUnit
Signature
declare const reusedUnit: (
existing: LocalServiceInstance,
unit: NormalizedLocalServiceUnit,
serviceName: string,
) => LocalServiceInstance;
startUnit
Signature
declare const startUnit: (
client: DockerClient,
request: LocalServiceStartRequest,
recipe: NormalizedLocalServiceRecipe,
unit: NormalizedLocalServiceUnit,
networkName: string,
volumes: Readonly<Record<string, string>>,
gatewayAddress?: string,
) => Promise<LocalServiceInstance>;
docker-composite.ts
startComposite
Signature
declare const startComposite: (
client: DockerClient,
request: LocalServiceStartRequest,
gatewayAddress?: string,
) => Promise<LocalServiceInstance>;
docker-health.ts
healthTimeout
Signature
declare const healthTimeout: (id: string) => never;
publishedPortArguments
Signature
declare const publishedPortArguments: (
containerPort: number,
gatewayAddress?: string,
hostPort?: number,
) => Promise<string[]>;
randomLoopbackPort
Signature
declare const randomLoopbackPort: (containerPort: number) => string;
wait
Signature
declare const wait: (milliseconds: number, signal?: AbortSignal) => Promise<void>;
docker-inspect.ts
parseContainers
Signature
declare const parseContainers: (source: string) => readonly DockerContainer[];
parseVolumes
Signature
declare const parseVolumes: (source: string) => readonly DockerVolume[];
docker-materializer-support.ts
argument
Signature
declare const argument: (value: string) => string;
duration
Signature
declare const duration: (value: number) => string;
healthCommand
Signature
declare const healthCommand: (values: readonly