Class DockerClient.ListContainersParam

java.lang.Object
com.spotify.docker.client.DockerClient.Param
com.spotify.docker.client.DockerClient.ListContainersParam
Direct Known Subclasses:
DockerClient.ListContainersFilterParam
Enclosing interface:
DockerClient

public static class DockerClient.ListContainersParam extends DockerClient.Param
  • Constructor Details

    • ListContainersParam

      public ListContainersParam(String name, String value)
  • Method Details

    • create

      public static DockerClient.ListContainersParam create(String name, String value)
      Create a custom parameter.
      Parameters:
      name - custom name
      value - custom value
      Returns:
      ListContainersParam
    • filter

      public static DockerClient.ListContainersParam filter(String key, String value)
      Create a "filters" query param from a key/value pair.
      Parameters:
      key - Type of filter
      value - Value of filter
      Returns:
      ListContainersParam
    • allContainers

      public static DockerClient.ListContainersParam allContainers()
      Show all containers. Only running containers are shown by default
      Returns:
      ListContainersParam
    • allContainers

      public static DockerClient.ListContainersParam allContainers(boolean all)
      Show all containers. Only running containers are shown by default
      Parameters:
      all - Whether to show all containers
      Returns:
      ListContainersParam
    • limitContainers

      public static DockerClient.ListContainersParam limitContainers(Integer limit)
      Show limit last created containers, include non-running ones.
      Parameters:
      limit - Limit for number of containers to list
      Returns:
      ListContainersParam
    • containersCreatedSince

      public static DockerClient.ListContainersParam containersCreatedSince(String id)
      Show only containers created since id, include non-running ones.
      Parameters:
      id - container ID
      Returns:
      ListContainersParam
    • containersCreatedBefore

      public static DockerClient.ListContainersParam containersCreatedBefore(String id)
      Show only containers created before id, include non-running ones.
      Parameters:
      id - container ID
      Returns:
      ListContainersParam
    • withContainerSizes

      public static DockerClient.ListContainersParam withContainerSizes(Boolean size)
      Show the containers sizes.
      Parameters:
      size - Whether to show container sizes
      Returns:
      ListContainersParam
    • withExitStatus

      public static DockerClient.ListContainersParam withExitStatus(int exitStatus)
      Show exited containers with given exit status.
      Parameters:
      exitStatus - Integer exit status
      Returns:
      ListContainersParam
    • withStatusCreated

      public static DockerClient.ListContainersParam withStatusCreated()
      Show created containers.
      Returns:
      ListContainersParam
    • withStatusRestarting

      public static DockerClient.ListContainersParam withStatusRestarting()
      Show restarting containers.
      Returns:
      ListContainersParam
    • withStatusRunning

      public static DockerClient.ListContainersParam withStatusRunning()
      Show running containers.
      Returns:
      ListContainersParam
    • withStatusPaused

      public static DockerClient.ListContainersParam withStatusPaused()
      Show paused containers.
      Returns:
      ListContainersParam
    • withStatusExited

      public static DockerClient.ListContainersParam withStatusExited()
      Show exited containers.
      Returns:
      ListContainersParam
    • exitedContainers

      @Deprecated public static DockerClient.ListContainersParam exitedContainers()
      Deprecated.
      Replaced by withStatusExited()
      Show exited containers.
      Returns:
      ListContainersParam
    • withLabel

      public static DockerClient.ListContainersParam withLabel(String label, String value)
      Show containers with a label value.
      Parameters:
      label - The label to filter on
      value - The value of the label
      Returns:
      ListContainersParam
    • withLabel

      public static DockerClient.ListContainersParam withLabel(String label)
      Show containers with a label.
      Parameters:
      label - The label to filter on
      Returns:
      ListContainersParam