Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argument "--start-interval" for docker health check not supported in dockerfile when building images #4335

Open
codeStev opened this issue Nov 8, 2024 · 0 comments

Comments

@codeStev
Copy link

codeStev commented Nov 8, 2024

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:

  1. Use a dockerfile containing a healthcheck with the argument "--start-interval" as the base image.
  2. configure the jib task to create an image from the base image
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants