Adapter over dockerode to expose a minimal API for the purpose of this application. Responsible for any interaction with dockerode, including:

  • Initializing dockerode
  • Encapsulating exceptions
  • Querying for containers with labels based on our criteria
  • Deserializing and validating the JSON labels

Constructors

Methods

  • Contains behavior to deserialize the labels on the containers. Converts to appropriate type and validates

    Parameters

    • containers: ContainerInfo[]

      containers with labels to deserialize

    Returns DnsbaseEntry[]

    deserialized labels

    If serivce hasn't been initialized

  • Finds containers with the labels associated with this instance of the docker-compose-external-dns project. Returns the containers information verbatim.

    Returns Promise<ContainerInfo[]>

    Promise resolving to the docker containers

    If serivce hasn't been initialized

    If docker throws an error fetching containers

  • Initializes the class by fetching the docker instance

    Returns void

    If service is already initialized

    throws if err initializing docker