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

Dind overview

Docker in docker engine

Added in v1.0.0


Table of contents


Engines

makeDindLayerFromPlatformConstructor

Spawns a docker in docker container on the remote host provided by another layer and exposes the dind container as a layer. This dind engine was built to power the unit tests.

Signature

export declare const makeDindLayerFromPlatformConstructor: <
  PlatformLayerConstructor extends (
    connectionOptions: any
  ) => Layer.Layer<Layer.Layer.Success<DockerEngine.DockerLayer>, unknown, unknown>,
  SupportedConnectionOptions extends MobyConnectionOptions = PlatformLayerConstructor extends (
    connectionOptions: infer C
  ) => Layer.Layer<Layer.Layer.Success<DockerEngine.DockerLayer>, infer _E, infer _R>
    ? C
    : never
>(
  platformLayerConstructor: PlatformLayerConstructor
) => MakeDindLayerFromPlatformConstructor<PlatformLayerConstructor>

Added in v1.0.0

Layers

MakeDindLayerFromPlatformConstructor (type alias)

Signature

export type MakeDindLayerFromPlatformConstructor<
  PlatformLayerConstructor extends (
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    connectionOptions: any
  ) => Layer.Layer<Layer.Layer.Success<DockerEngine.DockerLayer>, unknown, unknown>,
  SupportedConnectionOptions extends MobyConnectionOptions = PlatformLayerConstructor extends (
    connectionOptions: infer C
  ) => Layer.Layer<Layer.Layer.Success<DockerEngine.DockerLayer>, infer _E, infer _R>
    ? C
    : never,
  PlatformLayerConstructorError = ReturnType<PlatformLayerConstructor> extends Layer.Layer<
    Layer.Layer.Success<DockerEngine.DockerLayer>,
    infer E,
    infer _R
  >
    ? E
    : never,
  PlatformLayerConstructorContext = ReturnType<PlatformLayerConstructor> extends Layer.Layer<
    Layer.Layer.Success<DockerEngine.DockerLayer>,
    infer _E,
    infer R
  >
    ? R
    : never
> = <
  ConnectionOptionsToHost extends SupportedConnectionOptions,
  ConnectionOptionsToDind extends SupportedConnectionOptions["_tag"]
>(options: {
  exposeDindContainerBy: ConnectionOptionsToDind
  connectionOptionsToHost: ConnectionOptionsToHost
  dindBaseImage: RecommendedDindBaseImages
}) => Layer.Layer<
  Layer.Layer.Success<DockerEngine.DockerLayer>,
  | ImagesError
  | SystemsError
  | VolumesError
  | ParseResult.ParseError
  | ContainersError
  | PlatformLayerConstructorError
  | (ConnectionOptionsToDind extends "socket" ? PlatformError.PlatformError : never),
  | PlatformLayerConstructorContext
  | (ConnectionOptionsToDind extends "socket" ? Path.Path | FileSystem.FileSystem : never)
>

Added in v1.0.0

layerAgnostic

Signature

export declare const layerAgnostic: MakeDindLayerFromPlatformConstructor<
  (
    connectionOptions: HttpConnectionOptionsTagged | HttpsConnectionOptionsTagged
  ) => DockerEngine.DockerLayerWithoutHttpClientOrWebsocketConstructor,
  | { readonly _tag: "http"; readonly host: string; readonly port: number; readonly path?: string | undefined }
  | {
      readonly _tag: "https"
      readonly host: string
      readonly port: number
      readonly path?: string | undefined
      readonly cert?: string | undefined
      readonly ca?: string | undefined
      readonly key?: string | undefined
      readonly passphrase?: string | undefined
    },
  never,
  HttpClient<HttpClientError, Scope.Scope> | WebSocketConstructor
>

Added in v1.0.0

layerBun

Signature

export declare const layerBun: MakeDindLayerFromPlatformConstructor<
  (connectionOptions: MobyConnectionOptions) => DockerEngine.DockerLayer,
  | { readonly _tag: "socket"; readonly socketPath: string }
  | {
      readonly _tag: "ssh"
      readonly remoteSocketPath: string
      readonly host: string
      readonly port?: number
      readonly forceIPv4?: boolean
      readonly forceIPv6?: boolean
      readonly hostHash?: string
      readonly hostVerifier?: HostVerifier | SyncHostVerifier | HostFingerprintVerifier | SyncHostFingerprintVerifier
      readonly username?: string
      readonly password?: string
      readonly agent?: BaseAgent | string
      readonly privateKey?: Buffer | string
      readonly passphrase?: Buffer | string
      readonly localHostname?: string
      readonly localUsername?: string
      readonly tryKeyboard?: boolean
      readonly keepaliveInterval?: number
      readonly keepaliveCountMax?: number
      readonly readyTimeout?: number
      readonly strictVendor?: boolean
      readonly sock?: Readable
      readonly agentForward?: boolean
      readonly algorithms?: Algorithms
      readonly debug?: DebugFunction
      readonly authHandler?: AuthenticationType[] | AuthHandlerMiddleware | AuthMethod[]
      readonly localAddress?: string
      readonly localPort?: number
      readonly timeout?: number
      readonly ident?: Buffer | string
    }
  | { readonly _tag: "http"; readonly host: string; readonly port: number; readonly path?: string | undefined }
  | {
      readonly _tag: "https"
      readonly host: string
      readonly port: number
      readonly path?: string | undefined
      readonly cert?: string | undefined
      readonly ca?: string | undefined
      readonly key?: string | undefined
      readonly passphrase?: string | undefined
    },
  never,
  never
>

Added in v1.0.0

layerDeno

Signature

export declare const layerDeno: MakeDindLayerFromPlatformConstructor<
  (connectionOptions: MobyConnectionOptions) => DockerEngine.DockerLayer,
  | { readonly _tag: "socket"; readonly socketPath: string }
  | {
      readonly _tag: "ssh"
      readonly remoteSocketPath: string
      readonly host: string
      readonly port?: number
      readonly forceIPv4?: boolean
      readonly forceIPv6?: boolean
      readonly hostHash?: string
      readonly hostVerifier?: HostVerifier | SyncHostVerifier | HostFingerprintVerifier | SyncHostFingerprintVerifier
      readonly username?: string
      readonly password?: string
      readonly agent?: BaseAgent | string
      readonly privateKey?: Buffer | string
      readonly passphrase?: Buffer | string
      readonly localHostname?: string
      readonly localUsername?: string
      readonly tryKeyboard?: boolean
      readonly keepaliveInterval?: number
      readonly keepaliveCountMax?: number
      readonly readyTimeout?: number
      readonly strictVendor?: boolean
      readonly sock?: Readable
      readonly agentForward?: boolean
      readonly algorithms?: Algorithms
      readonly debug?: DebugFunction
      readonly authHandler?: AuthenticationType[] | AuthHandlerMiddleware | AuthMethod[]
      readonly localAddress?: string
      readonly localPort?: number
      readonly timeout?: number
      readonly ident?: Buffer | string
    }
  | { readonly _tag: "http"; readonly host: string; readonly port: number; readonly path?: string | undefined }
  | {
      readonly _tag: "https"
      readonly host: string
      readonly port: number
      readonly path?: string | undefined
      readonly cert?: string | undefined
      readonly ca?: string | undefined
      readonly key?: string | undefined
      readonly passphrase?: string | undefined
    },
  never,
  never
>

Added in v1.0.0

layerNodeJS

Signature

export declare const layerNodeJS: MakeDindLayerFromPlatformConstructor<
  (connectionOptions: MobyConnectionOptions) => DockerEngine.DockerLayer,
  | { readonly _tag: "socket"; readonly socketPath: string }
  | {
      readonly _tag: "ssh"
      readonly remoteSocketPath: string
      readonly host: string
      readonly port?: number
      readonly forceIPv4?: boolean
      readonly forceIPv6?: boolean
      readonly hostHash?: string
      readonly hostVerifier?: HostVerifier | SyncHostVerifier | HostFingerprintVerifier | SyncHostFingerprintVerifier
      readonly username?: string
      readonly password?: string
      readonly agent?: BaseAgent | string
      readonly privateKey?: Buffer | string
      readonly passphrase?: Buffer | string
      readonly localHostname?: string
      readonly localUsername?: string
      readonly tryKeyboard?: boolean
      readonly keepaliveInterval?: number
      readonly keepaliveCountMax?: number
      readonly readyTimeout?: number
      readonly strictVendor?: boolean
      readonly sock?: Readable
      readonly agentForward?: boolean
      readonly algorithms?: Algorithms
      readonly debug?: DebugFunction
      readonly authHandler?: AuthenticationType[] | AuthHandlerMiddleware | AuthMethod[]
      readonly localAddress?: string
      readonly localPort?: number
      readonly timeout?: number
      readonly ident?: Buffer | string
    }
  | { readonly _tag: "http"; readonly host: string; readonly port: number; readonly path?: string | undefined }
  | {
      readonly _tag: "https"
      readonly host: string
      readonly port: number
      readonly path?: string | undefined
      readonly cert?: string | undefined
      readonly ca?: string | undefined
      readonly key?: string | undefined
      readonly passphrase?: string | undefined
    },
  never,
  never
>

Added in v1.0.0

layerUndici

Signature

export declare const layerUndici: MakeDindLayerFromPlatformConstructor<
  (connectionOptions: MobyConnectionOptions) => DockerEngine.DockerLayer,
  | { readonly _tag: "socket"; readonly socketPath: string }
  | {
      readonly _tag: "ssh"
      readonly remoteSocketPath: string
      readonly host: string
      readonly port?: number
      readonly forceIPv4?: boolean
      readonly forceIPv6?: boolean
      readonly hostHash?: string
      readonly hostVerifier?: HostVerifier | SyncHostVerifier | HostFingerprintVerifier | SyncHostFingerprintVerifier
      readonly username?: string
      readonly password?: string
      readonly agent?: BaseAgent | string
      readonly privateKey?: Buffer | string
      readonly passphrase?: Buffer | string
      readonly localHostname?: string
      readonly localUsername?: string
      readonly tryKeyboard?: boolean
      readonly keepaliveInterval?: number
      readonly keepaliveCountMax?: number
      readonly readyTimeout?: number
      readonly strictVendor?: boolean
      readonly sock?: Readable
      readonly agentForward?: boolean
      readonly algorithms?: Algorithms
      readonly debug?: DebugFunction
      readonly authHandler?: AuthenticationType[] | AuthHandlerMiddleware | AuthMethod[]
      readonly localAddress?: string
      readonly localPort?: number
      readonly timeout?: number
      readonly ident?: Buffer | string
    }
  | { readonly _tag: "http"; readonly host: string; readonly port: number; readonly path?: string | undefined }
  | {
      readonly _tag: "https"
      readonly host: string
      readonly port: number
      readonly path?: string | undefined
      readonly cert?: string | undefined
      readonly ca?: string | undefined
      readonly key?: string | undefined
      readonly passphrase?: string | undefined
    },
  never,
  never
>

Added in v1.0.0

layerWeb

Signature

export declare const layerWeb: MakeDindLayerFromPlatformConstructor<
  (connectionOptions: HttpConnectionOptionsTagged | HttpsConnectionOptionsTagged) => DockerEngine.DockerLayer,
  | { readonly _tag: "http"; readonly host: string; readonly port: number; readonly path?: string | undefined }
  | {
      readonly _tag: "https"
      readonly host: string
      readonly port: number
      readonly path?: string | undefined
      readonly cert?: string | undefined
      readonly ca?: string | undefined
      readonly key?: string | undefined
      readonly passphrase?: string | undefined
    },
  never,
  never
>

Added in v1.0.0