Skip to content

HEALTHCHECK --start-interval parameter produces "not defined" error #6019

@Paraphraser

Description

@Paraphraser

Issue #21701 reported a problem where the HEALTHCHECK --start-interval parameter was producing an error.

PR #5472 added support for --start-interval and closed #21701.

However, as of today (2025-03-03), a Dockerfile containing:

HEALTHCHECK --interval=60s --timeout=8s --retries=2 --start-period=60s --start-interval=3s \
  CMD ["/bin/sh", "/usr/sbin/healthcheck.sh"]

is producing this error:

[2/2] STEP 9/9: HEALTHCHECK --interval=60s --timeout=8s --retries=2 --start-period=60s --start-interval=3s   CMD ["/bin/sh", "/usr/sbin/healthcheck.sh"]
flag provided but not defined: -start-interval
Usage:
  -interval string
    	
  -retries string
    	
  -start-period string
    	
  -timeout string
    	
Error: building at STEP "HEALTHCHECK --interval=60s --timeout=8s --retries=2 --start-period=60s --start-interval=3s CMD /bin/sh /usr/sbin/healthcheck.sh": flag provided but not defined: -start-interval

Using either docker build or docker buildx build with the same Dockerfile does not produce this error.

At github.com/zyclonite/zerotier-docker PR38, this issue appears to be behind all these failures:

Image

Has the PR #5472 fix fallen out?

For the record, this is from my local build system (where I can replicate the GitHub problem):

$ docker version
Client: Docker Engine - Community
 Version:           28.0.1
 API version:       1.48
 Go version:        go1.23.6
 Git commit:        068a01e
 Built:             Wed Feb 26 10:41:16 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.0.1
  API version:      1.48 (minimum version 1.24)
  Go version:       go1.23.6
  Git commit:       bbd0a17
  Built:            Wed Feb 26 10:41:16 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.25
  GitCommit:        bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
 runc:
  Version:          1.2.4
  GitCommit:        v1.2.4-0-g6c52b3f
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

$ buildah --version
buildah version 1.28.2 (image-spec 1.1.0-rc2, runtime-spec 1.0.2-dev)

$ uname -a
Linux prx-deb 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 GNU/Linux

I do not know which version of buildah is being used on GitHub.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions