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