Class Dockerfile.Healthcheck
java.lang.Object
com.bmuschko.gradle.docker.tasks.image.Dockerfile.Healthcheck
- Enclosing class:
- Dockerfile
Input data for a
Dockerfile.HealthcheckInstruction
.- Since:
- ???
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCmd()
withInterval
(Duration interval) Sets the healthcheck interval by adding--interval
to Healthcheck instruction.withRetries
(int retries) Sets the healthcheck number of retries by adding--retries
to Healthcheck instruction.withStartInterval
(Duration startInterval) This option requires Docker Engine version 25.0 or later.withStartPeriod
(Duration startPeriod) Sets the healthcheck startPeriod by adding--start-period
to Healthcheck instruction.withTimeout
(Duration timeout) Sets the healthcheck timeout by adding--timeout
to Healthcheck instruction.
-
Constructor Details
-
Healthcheck
-
-
Method Details
-
withInterval
Sets the healthcheck interval by adding--interval
to Healthcheck instruction.- Parameters:
interval
- aDuration
in seconds.- Returns:
- this healthcheck.
-
withTimeout
Sets the healthcheck timeout by adding--timeout
to Healthcheck instruction.- Parameters:
timeout
- aDuration
in seconds.- Returns:
- this healthcheck.
-
withStartPeriod
Sets the healthcheck startPeriod by adding--start-period
to Healthcheck instruction.- Parameters:
startPeriod
- aDuration
in seconds.- Returns:
- this healthcheck.
-
withStartInterval
This option requires Docker Engine version 25.0 or later. Sets the healthcheck startInterval by adding--start-interval
to Healthcheck instruction.- Parameters:
startInterval
- aDuration
in seconds.- Returns:
- this healthcheck.
-
withRetries
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
-
getTimeout
-
getStartPeriod
-
getStartInterval
-
getRetries
-
getCmd
-