Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Daemon/DaemonExec

Index

Functions

attachStreams

  • attachStreams(container: Docker.Container, stdinStream: NodeJS.ReadableStream, stdoutStream: NodeJS.WritableStream, stderrStream: NodeJS.WritableStream): Promise<NodeJS.ReadWriteStream>
  • Attaches input, output, and error streams to a container

    Parameters

    • container: Docker.Container

      the container to attach

    • stdinStream: NodeJS.ReadableStream

      the input stream

    • stdoutStream: NodeJS.WritableStream

      the output stream

    • stderrStream: NodeJS.WritableStream

      the error strean

    Returns Promise<NodeJS.ReadWriteStream>

    a ReadWriteStream for the container

createContainer

  • createContainer(docker: Docker, image: string, command: string[], volumePairs: VolumeDefinition[]): Promise<Docker.Container>
  • Creates a Docker container

    Parameters

    • docker: Docker

      the docker daemon that controls the container

    • image: string

      the image the container uses

    • command: string[]

      an array that holds the command for the container

    • volumePairs: VolumeDefinition[]

      an array of VolumeDefinitions

    Returns Promise<Docker.Container>

    the Container

ensureImageImport

  • ensureImageImport(docker: Docker, name: string, onProgress?: (event: DockerModemEvent) => void): Promise<void>
  • Imports an image if it does not exist, resolving when the image is imported.

    Parameters

    • docker: Docker

      The docker daemon with which the image will be stored

    • name: string

      The name of the image to pull

    • Optional onProgress: (event: DockerModemEvent) => void

      a callback for when the progress of the image import updates

        • (event: DockerModemEvent): void
        • Parameters

          • event: DockerModemEvent

          Returns void

    Returns Promise<void>

importImage

  • importImage(docker: Docker, name: string): Promise<NodeJS.ReadWriteStream>
  • Starts the import of an image

    Parameters

    • docker: Docker

      The docker daemon with which the image will be stored

    • name: string

      The name of the image to pull

    Returns Promise<NodeJS.ReadWriteStream>

    a ReadableStream to track the progress of the import

listContainers

  • listContainers(docker: Docker): Promise<Docker.ContainerInfo[]>
  • Returns information about the containers

    Parameters

    • docker: Docker

      The docker daemon to pull information from

    Returns Promise<Docker.ContainerInfo[]>

    an array of ContainerInfo

listImages

  • listImages(docker: Docker): Promise<Docker.ImageInfo[]>
  • Returns information about the images

    Parameters

    • docker: Docker

      The docker daemon to pull information from

    Returns Promise<Docker.ImageInfo[]>

    an array of ImageInfo

removeContainer

  • removeContainer(container: Docker.Container): Promise<void>
  • Removes the container

    Parameters

    • container: Docker.Container

      the container to remove

    Returns Promise<void>

stopContainer

  • stopContainer(container: Docker.Container): Promise<void>
  • Stops the container

    Parameters

    • container: Docker.Container

      the container to stop

    Returns Promise<void>

Generated using TypeDoc