Class Dockerfile.Healthcheck

java.lang.Object
com.bmuschko.gradle.docker.tasks.image.Dockerfile.Healthcheck
Enclosing class:
Dockerfile

public static class Dockerfile.Healthcheck extends Object
Since:
???
See Also:
  • Constructor Details

    • Healthcheck

      public Healthcheck(@Nonnull String cmd)
  • Method Details

    • withInterval

      public Dockerfile.Healthcheck withInterval(Duration interval)
      Sets the healthcheck interval by adding --interval to Healthcheck instruction.
      Parameters:
      interval - a Duration in seconds.
      Returns:
      this healthcheck.
    • withTimeout

      public Dockerfile.Healthcheck withTimeout(Duration timeout)
      Sets the healthcheck timeout by adding --timeout to Healthcheck instruction.
      Parameters:
      timeout - a Duration in seconds.
      Returns:
      this healthcheck.
    • withStartPeriod

      public Dockerfile.Healthcheck withStartPeriod(Duration startPeriod)
      Sets the healthcheck startPeriod by adding --start-period to Healthcheck instruction.
      Parameters:
      startPeriod - a Duration in seconds.
      Returns:
      this healthcheck.
    • withStartInterval

      public Dockerfile.Healthcheck withStartInterval(@Nullable Duration startInterval)
      This option requires Docker Engine version 25.0 or later. Sets the healthcheck startInterval by adding --start-interval to Healthcheck instruction.
      Parameters:
      startInterval - a Duration in seconds.
      Returns:
      this healthcheck.
    • withRetries

      public Dockerfile.Healthcheck withRetries(int retries)
      Sets the healthcheck number of retries by adding --retries to Healthcheck instruction.
      Parameters:
      retries - the number of retries. Must be greater than 0, or it will fallback to the default (3).
      Returns:
      this healthcheck.
    • getInterval

      @Nullable public Duration getInterval()
    • getTimeout

      @Nullable public Duration getTimeout()
    • getStartPeriod

      @Nullable public Duration getStartPeriod()
    • getStartInterval

      @Nullable public Duration getStartInterval()
    • getRetries

      @Nullable public Integer getRetries()
    • getCmd

      public String getCmd()