Skip to main content Link Search Menu Expand Document (external link)

Docker overview

Docker engine

Added in v1.0.0


Table of contents


Docker

build

Implements the docker build command. It doesn’t have all the flags that the images build endpoint exposes.

Signature

export declare const build: <E1>({
  auth,
  buildArgs,
  context,
  dockerfile,
  platform,
  tag
}: {
  tag: string
  auth?: string | undefined
  platform?: string | undefined
  dockerfile?: string | undefined
  context: Stream.Stream<Uint8Array, E1, never>
  buildArgs?: Record<string, string | undefined> | undefined
}) => Stream.Stream<JSONMessage, ImagesError, Images>

Added in v1.0.0

buildScoped

Implements the docker build command as a scoped effect. When the scope is closed, the built image is removed. It doesn’t have all the flags that the images build endpoint exposes.

Signature

export declare const buildScoped: <E1>({
  auth,
  buildArgs,
  context,
  dockerfile,
  platform,
  tag
}: {
  tag: string
  auth?: string | undefined
  platform?: string | undefined
  dockerfile?: string | undefined
  buildArgs?: Record<string, string | undefined> | undefined
  context: Stream.Stream<Uint8Array, E1, never>
}) => Effect.Effect<Stream.Stream<JSONMessage, ImagesError, never>, never, Scope.Scope | Images>

Added in v1.0.0

exec

Implements the docker exec command in a blocking fashion.

Signature

export declare const exec: ({
  command,
  containerId
}: {
  containerId: string
  command: Array<string>
}) => Effect.Effect<string, ExecsError | Socket.SocketError | ParseResult.ParseError, Execs>

Added in v1.0.0

execNonBlocking

Implements the docker exec command in a non blocking fashion.

Signature

export declare const execNonBlocking: ({
  command,
  containerId
}: {
  containerId: string
  command: Array<string>
}) => Effect.Effect<void, ExecsError | Socket.SocketError | ParseResult.ParseError, Execs>

Added in v1.0.0

images

Implements the docker images command.

Signature

export declare const images: (
  options?: Parameters<Images["list"]>[0]
) => Effect.Effect<ReadonlyArray<ImageSummary>, ImagesError, Images>

Added in v1.0.0

info

Implements the docker info command.

Signature

export declare const info: () => Effect.Effect<Readonly<SystemInfoResponse>, SystemsError, Systems>

Added in v1.0.0

ping

Implements the docker ping command.

Signature

export declare const ping: () => Effect.Effect<"OK", SystemsError, Systems>

Added in v1.0.0

pingHead

Implements the docker ping command.

Signature

export declare const pingHead: () => Effect.Effect<void, SystemsError, Systems>

Added in v1.0.0

ps

Implements the docker ps command.

Signature

export declare const ps: (
  options?: Parameters<Containers["list"]>[0]
) => Effect.Effect<ReadonlyArray<ContainerListResponseItem>, ContainersError, Containers>

Added in v1.0.0

pull

Implements the docker pull command. It does not have all the flags that the images create endpoint exposes.

Signature

export declare const pull: ({
  auth,
  image,
  platform
}: {
  image: string
  auth?: string | undefined
  platform?: string | undefined
}) => Stream.Stream<JSONMessage, ImagesError, Images>

Added in v1.0.0

pullScoped

Implements the docker pull command as a scoped effect. When the scope is closed, the pulled image is removed. It doesn’t have all the flags that the images create endpoint exposes.

Signature

export declare const pullScoped: ({
  auth,
  image,
  platform
}: {
  image: string
  auth?: string | undefined
  platform?: string | undefined
}) => Effect.Effect<Stream.Stream<JSONMessage, ImagesError, never>, never, Images | Scope.Scope>

Added in v1.0.0

push

Implements the docker push command.

Signature

export declare const push: (options: Parameters<Images["push"]>[0]) => Stream.Stream<string, ImagesError, Images>

Added in v1.0.0

run

Implements docker run command.

Signature

export declare const run: (
  containerOptions: Parameters<Containers["create"]>[0]
) => Effect.Effect<ContainerInspectResponse, ContainersError, Containers>

Added in v1.0.0

runScoped

Implements docker run command as a scoped effect. When the scope is closed, both the image and the container is removed.

Signature

export declare const runScoped: (
  containerOptions: Parameters<Containers["create"]>[0]
) => Effect.Effect<ContainerInspectResponse, ContainersError, Scope.Scope | Containers>

Added in v1.0.0

Implements the docker search command.

Signature

export declare const search: (
  options: Parameters<Images["search"]>[0]
) => Effect.Effect<ReadonlyArray<RegistrySearchResponse>, ImagesError, Images>

Added in v1.0.0

start

Implements the docker start command.

Signature

export declare const start: (containerId: string) => Effect.Effect<void, ContainersError, Containers>

Added in v1.0.0

stop

Implements the docker stop command.

Signature

export declare const stop: (containerId: string) => Effect.Effect<void, ContainersError, Containers>

Added in v1.0.0

version

Implements the docker version command.

Signature

export declare const version: () => Effect.Effect<Readonly<SystemVersionResponse>, SystemsError, Systems>

Added in v1.0.0

Layers

DockerLayer (type alias)

Signature

export type DockerLayer = Moby.MobyLayer

Added in v1.0.0

DockerLayerWithoutHttpClientOrWebsocketConstructor (type alias)

Signature

export type DockerLayerWithoutHttpClientOrWebsocketConstructor = Moby.MobyLayerWithoutHttpClientOrWebsocketConstructor

Added in v1.0.0

layerAgnostic

Signature

export declare const layerAgnostic: (
  connectionOptions: HttpConnectionOptionsTagged | HttpsConnectionOptionsTagged
) => DockerLayerWithoutHttpClientOrWebsocketConstructor

Added in v1.0.0

layerBun

Signature

export declare const layerBun: (connectionOptions: MobyConnectionOptions) => DockerLayer

Added in v1.0.0

layerDeno

Signature

export declare const layerDeno: (connectionOptions: MobyConnectionOptions) => DockerLayer

Added in v1.0.0

layerNodeJS

Signature

export declare const layerNodeJS: (connectionOptions: MobyConnectionOptions) => DockerLayer

Added in v1.0.0

layerUndici

Signature

export declare const layerUndici: (connectionOptions: MobyConnectionOptions) => DockerLayer

Added in v1.0.0

layerWeb

Signature

export declare const layerWeb: (
  connectionOptions: HttpConnectionOptionsTagged | HttpsConnectionOptionsTagged
) => DockerLayer

Added in v1.0.0

layerWithoutHttpCLient

Signature

export declare const layerWithoutHttpCLient: Moby.MobyLayerWithoutHttpClientOrWebsocketConstructor

Added in v1.0.0