docker.logs

Collect the stdout/stderr logs from one or more docker containers. One of `container` or `container_list_options` is required.

docker.logs

Collect the stdout/stderr logs from one or more docker containers. One of container or container_list_options is required.

collect:
  v1:
    - docker.logs:
        description: >-
          The docker logs for all the containers labeled with
          com.supercooltool.onprem
        output_dir: /docker/logs
        timeout_seconds: 100
        container_list_options:
          All: true
          Filters:
            label:
              - com.supercooltool.onprem=true
        container_logs_options:
          Timestamps: true

Optional Parameters

  • container - A container name

  • container_list_options - Options to be used to filter the list of containers, as in The Docker API

  • container_logs_options - Args as would be given to docker logs, as in The Docker API

Outputs

  • {{.Name}}.stdout - The stdout logs. Will generate this file for each matched container

  • {{.Name}}.stderr - The stderr logs. Will generate this file for each matched container


Shared Parameters

This spec also inherits all of the required and optional Shared Parameters