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

Unable to build container with --start-interval healthcheck option #21701

Open
4censord opened this issue Feb 17, 2024 · 8 comments · May be fixed by containers/buildah#5472
Open

Unable to build container with --start-interval healthcheck option #21701

4censord opened this issue Feb 17, 2024 · 8 comments · May be fixed by containers/buildah#5472
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@4censord
Copy link

4censord commented Feb 17, 2024

Issue Description

Building a container that has a health check with the --start-interval=15s option defined fails.

I just got a containerfile that contains this option, and podman is not able to build the container.
According to https://docs.docker.com/engine/reference/builder/#healthcheck, this option is included since docker engine 25.0.

start interval is the time between health checks during the start period. This option requires Docker Engine version 25.0 or later.

buildah is also not able to build this container, If i should open another issue over there please tell me.

Steps to reproduce the issue

Try to build the following Container file with podman

FROM busybox:latest
HEALTHCHECK --start-interval=15s CMD /bin/true

Describe the results you received

The build fails with the following error:

$ podman build . -t repro --file repro.Dockerfile
STEP 1/2: FROM busybox:latest
STEP 2/2: HEALTHCHECK --start-interval=15s CMD /bin/true
flag provided but not defined: -start-interval
Usage:
  -interval string
    	
  -retries string
    	
  -start-period string
    	
  -timeout string
    	
Error: building at STEP "HEALTHCHECK --start-interval=15s CMD /bin/true": flag provided but not defined: -start-interval

Describe the results you expected

Podman either ignores or supports the option.

podman info output

host:
  arch: amd64
  buildahVersion: 1.33.5
  cgroupControllers:
  - cpu
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.1.10-1
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: 2dcd736e46ded79a53339462bc251694b150f870'
  cpuUtilization:
    idlePercent: 97.72
    systemPercent: 1.24
    userPercent: 1.04
  cpus: 24
  databaseBackend: boltdb
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  freeLocks: 2033
  hostname: thearch
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65537
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65537
  kernel: 6.7.4-arch1-1
  linkmode: dynamic
  logDriver: journald
  memFree: 11644665856
  memTotal: 33488318464
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: /usr/lib/podman/aardvark-dns is owned by aardvark-dns 1.10.0-1
      path: /usr/lib/podman/aardvark-dns
      version: aardvark-dns 1.10.0
    package: /usr/lib/podman/netavark is owned by netavark 1.10.2-1
    path: /usr/lib/podman/netavark
    version: netavark 1.10.2
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 1.14.2-1
    path: /usr/bin/crun
    version: |-
      crun version 1.14.2
      commit: 32b139f7553148fae47430d4418712ccdfa68149
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  pasta:
    executable: ""
    package: ""
    version: ""
  remoteSocket:
    exists: false
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.2.3-1
    version: |-
      slirp4netns version 1.2.3
      commit: c22fde291bb35b354e6ca44d13be181c76a0a432
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.5
  swapFree: 51539603456
  swapTotal: 51539603456
  uptime: 0h 52m 31.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /home/daniel/.config/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 3
    stopped: 0
  graphDriverName: btrfs
  graphOptions: {}
  graphRoot: /home/daniel/.local/share/containers/storage
  graphRootAllocated: 1919843373056
  graphRootUsed: 1223422160896
  graphStatus:
    Build Version: Btrfs v6.7.1
    Library Version: "102"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 32
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/daniel/.local/share/containers/storage/volumes
version:
  APIVersion: 4.9.3
  Built: 1708100283
  BuiltTime: Fri Feb 16 17:18:03 2024
  GitCommit: 8d2b55ddde1bc81f43d018dfc1ac027c06b26a7f-dirty
  GoVersion: go1.22.0
  Os: linux
  OsArch: linux/amd64
  Version: 4.9.3

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@4censord 4censord added the kind/bug Categorizes issue or PR as related to a bug. label Feb 17, 2024
Copy link

A friendly reminder that this issue had no activity for 30 days.

@4censord
Copy link
Author

A friendly reminder that it is still relevant, and hasn't even triaged yet.

As of right now, podman 4.9.3 is still the latest release, so it also hasn't been fixed.

@TonyBogdanov
Copy link

+1 on this.

@flouthoc
Copy link
Collaborator

flouthoc commented Apr 2, 2024

This needs changes on both imagebuilder and buildah, will add this to buildah once imagebuilder PR is merged here: openshift/imagebuilder#280

@ivanmarban
Copy link

+1

@rhatdan
Copy link
Member

rhatdan commented Apr 11, 2024

Since imagebuilder was merged, this should get moved forward.

@flouthoc
Copy link
Collaborator

Yes Let me open a PR against buildah.

@flouthoc
Copy link
Collaborator

PR containers/buildah#5472 should close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants