argument "--start-interval" for docker health check not supported in dockerfile when building images
codeStev opened this issue · 0 comments
Environment:
- Jib version: 3.4.3
- Build tool: Gradle 8.8
- OS: minideb
Description of the issue:
Using the jib gradle-task to build an image does not work with dockerfiles which include a Healthcheck with the argument "--start-interval".
Probably because the correspondig field does not exist in the corresponding jib-configuration (com.google.cloud.tools.jib.configuration.DockerHealthCheck).
Expected behavior:
The argument "--start-interval" is recognized correctly when building the image and the image can be published.
Steps to reproduce:
- Use a dockerfile containing a healthcheck with the argument "--start-interval" as the base image.
- configure the jib task to create an image from the base image
- run the task
jib-gradle-plugin
Configuration:
(our config, not a minimal config)
jib {
from {
image = "wiremock/wiremock:3.9.2-1-alpine"
}
to {
image = "yourImagePath"
tags = [
"your version"
]
auth {
username = "user"
password = "pw"
}
}
container {
entrypoint = 'INHERIT'
ports = ["8080"]
user = "1000"
}
extraDirectories {
paths {
path {
from = file('wiremock-data')
into = '/home/wiremock'
}
}
}
}
Log output:
com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Unrecognized field "StartInterval" (class com.google.cloud.tools.jib.image.json.ContainerConfigurationTemplate$HealthCheckObjectTemplate), not marked as ignorable (5 known properties: "Timeout", "Test", "StartPeriod", "Interval", "Retries"])
10:28:22 at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION
disabled); line: 1, column: 649] (through reference chain: com.google.cloud.tools.jib.image.json.ContainerConfigurationTemplate["config"]->com.google.cloud.tools.jib.image.json.ContainerConfigurationTemplate$ConfigurationObjectTemplate["Healthcheck"]->com.google.cloud.tools.jib.image.json.ContainerConfigurationTemplate$HealthCheckObjectTemplate["StartInterval"])
Additional Information:
The documentation listing the new argument: docs
The wiremock dockerfile : dockerfile