Class DockerLogsContainer

All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, Configurable<Task>

public class DockerLogsContainer extends DockerExistingContainer
Copies the container logs into standard out/err, the same as the `docker logs` command. The container output to standard out will go to standard out, and standard err to standard err.
  • Constructor Details

    • DockerLogsContainer

      public DockerLogsContainer()
  • Method Details

    • getFollow

      @Input @Optional public final Property<Boolean> getFollow()
      Set to true to follow the output, which will cause this task to block until the container exists. Default is unspecified (docker defaults to false).
    • getTailAll

      @Input @Optional public final Property<Boolean> getTailAll()
      Set to true to copy all output since the container has started. For long running containers or containers with a lot of output this could take a long time. This cannot be set if #tailCount is also set. Setting to false leaves the decision of how many lines to copy to docker. Default is unspecified (docker defaults to true).
    • getTailCount

      @Input @Optional public final Property<Integer> getTailCount()
      Limit the number of lines of existing output. This cannot be set if #tailAll is also set. Default is unspecified (docker defaults to all lines).
    • getStdOut

      @Input @Optional public final Property<Boolean> getStdOut()
      Include standard out. Default is true.
    • getStdErr

      @Input @Optional public final Property<Boolean> getStdErr()
      Include standard err. Default is true.
    • getShowTimestamps

      @Input @Optional public final Property<Boolean> getShowTimestamps()
      Set to the true to include a timestamp for each line in the output. Default is unspecified (docker defaults to false).
    • getSince

      @Input @Optional public final Property<Date> getSince()
      Limit the output to lines on or after the specified date. Default is unspecified (docker defaults to all lines).
    • getSink

      Sink to write log output into.
    • getInternalSince

      @Internal protected Date getInternalSince()
    • runRemoteCommand

      public void runRemoteCommand() throws InterruptedException
      Specified by:
      runRemoteCommand in class AbstractDockerRemoteApiTask
      Throws:
      InterruptedException
    • logAndProcessResponse

      public void logAndProcessResponse(com.github.dockerjava.api.DockerClient dockerClient) throws InterruptedException
      Throws:
      InterruptedException