Skip to content
RelKit
Esc
↑↓navigate↵open⌘Jpreview
On this page

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>;

Source

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;

Source

randomLoopbackPort

Signature

declare const randomLoopbackPort: (containerPort: number) => string;

Source

docker-composite-support.ts

argument

Signature

declare const argument: (value: string) => string;

Source

bindMountArguments

Signature

declare const bindMountArguments: (
  mounts: readonly LocalServiceBindMount[] | undefined,
) => string[];

Source

compositeLabels

Signature

declare const compositeLabels: (values: Readonly<Record<string, string>>) => string[];

Source

compositeSignal

Signature

declare const compositeSignal: (request: LocalServiceStartRequest) => {
  readonly signal?: AbortSignal;
};

Source

environmentArguments

Signature

declare const environmentArguments: (
  values: Readonly<Record<string, string>> | undefined,
) => string[];

Source

healthArgs

Signature

declare const healthArgs: (
  command: readonly string[],
  interval: number,
  timeout: number,
  retries: number,
) => string[];

Source

inspectNetwork

Signature

declare const inspectNetwork: (
  client: DockerClient,
  networkName: string,
  request: LocalServiceStartRequest,
) => Promise<Readonly<Record<string, string>> | undefined>;

Source

mountPath

Signature

declare const mountPath: (value: string) => string;

Source

owned

Signature

declare const owned: (
  actual: Readonly<Record<string, string>>,
  expected: Readonly<Record<string, string>>,
) => boolean;

Source

positive

Signature

declare const positive: (value: number) => number;

Source

resourceName

Signature

declare const resourceName: (value: string) => void;

Source

volumeNames

Signature

declare const volumeNames: (
  serviceName: string,
  requested: Readonly<Record<string, string>> | undefined,
  recipe: NormalizedLocalServiceRecipe,
) => Readonly<Record<string, string>>;

Source

docker-composite-unit.ts

reusedUnit

Signature

declare const reusedUnit: (
  existing: LocalServiceInstance,
  unit: NormalizedLocalServiceUnit,
  serviceName: string,
) => LocalServiceInstance;

Source

startUnit

Signature

declare const startUnit: (
  client: DockerClient,
  request: LocalServiceStartRequest,
  recipe: NormalizedLocalServiceRecipe,
  unit: NormalizedLocalServiceUnit,
  networkName: string,
  volumes: Readonly<Record<string, string>>,
  gatewayAddress?: string,
) => Promise<LocalServiceInstance>;

Source

docker-composite.ts

startComposite

Signature

declare const startComposite: (
  client: DockerClient,
  request: LocalServiceStartRequest,
  gatewayAddress?: string,
) => Promise<LocalServiceInstance>;

Source

docker-health.ts

healthTimeout

Signature

declare const healthTimeout: (id: string) => never;

Source

publishedPortArguments

Signature

declare const publishedPortArguments: (
  containerPort: number,
  gatewayAddress?: string,
  hostPort?: number,
) => Promise<string[]>;

Source

randomLoopbackPort

Signature

declare const randomLoopbackPort: (containerPort: number) => string;

Source

wait

Signature

declare const wait: (milliseconds: number, signal?: AbortSignal) => Promise<void>;

Source

docker-inspect.ts

parseContainers

Signature

declare const parseContainers: (source: string) => readonly DockerContainer[];

Source

parseVolumes

Signature

declare const parseVolumes: (source: string) => readonly DockerVolume[];

Source

docker-materializer-support.ts

argument

Signature

declare const argument: (value: string) => string;

Source

duration

Signature

declare const duration: (value: number) => string;

Source

healthCommand

Signature

declare const healthCommand: (values: readonly