[GH-ISSUE #2930] Docker/Podman healthcheck doesn't work with signal and relay containers #6113

Open
opened 2026-08-05 01:06:46 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @mradermaxlol on GitHub (Nov 22, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2930

Describe the problem

Docker/Podman healthcheck fails for signal & relay containers as, apparently, there is no /bin/sh in their base (distroless) image:
Error: crun: executable file /bin/sh not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
Healthcheck works fine for e.g. management container (as it's Ubuntu-based).

AFAIK the healthcheck mechanism doesn't allow specifying a binary path directly (and so /bin/sh invocation can't be bypassed).

I'm using the following healthcheck snippets for signal & relay, respectively:

healthcheck:
  start_period: 5s
  timeout: 3s
  interval: 15s
  retries: 2
  test: "ps aux | grep -v grep | grep -q netbird-signal || exit 1"
healthcheck:
  start_period: 5s
  timeout: 3s
  interval: 15s
  retries: 2
  test: "ps aux | grep -v grep | grep -q netbird-relay || exit 1"

As a suggestion on how to make it work - perhaps it's worth creating symlink to the actual shell in the containers' Dockerfiles? One extra line sounds reasonable.

To Reproduce

Steps to reproduce the behavior:

  1. Add the aforementioned healthcheck snippets to the compose file (for signal & relay containers)
  2. Start the compose project
  3. Experience healthcheck errors in system logs
  4. Also experience wrong container health status

Expected behavior
Healthcheck works for singal & relay containers.

Are you using NetBird Cloud?
No.

NetBird version
0.32.0

NetBird status -dA output:
N/A

Do you face any (non-mobile) client issues?
N/A

Screenshots
N/A

Additional context
N/A

Originally created by @mradermaxlol on GitHub (Nov 22, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2930 **Describe the problem** Docker/Podman healthcheck fails for signal & relay containers as, apparently, there is no /bin/sh in their base (distroless) image: `Error: crun: executable file /bin/sh not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found` Healthcheck works fine for e.g. management container (as it's Ubuntu-based). AFAIK the healthcheck mechanism doesn't allow specifying a binary path directly (and so `/bin/sh` invocation can't be bypassed). I'm using the following healthcheck snippets for signal & relay, respectively: ``` healthcheck: start_period: 5s timeout: 3s interval: 15s retries: 2 test: "ps aux | grep -v grep | grep -q netbird-signal || exit 1" ``` ``` healthcheck: start_period: 5s timeout: 3s interval: 15s retries: 2 test: "ps aux | grep -v grep | grep -q netbird-relay || exit 1" ``` As a suggestion on how to make it work - perhaps it's worth creating symlink to the actual shell in the containers' Dockerfiles? One extra line sounds reasonable. **To Reproduce** Steps to reproduce the behavior: 1. Add the aforementioned healthcheck snippets to the compose file (for signal & relay containers) 2. Start the compose project 3. Experience healthcheck errors in system logs 4. Also experience wrong container health status **Expected behavior** Healthcheck works for singal & relay containers. **Are you using NetBird Cloud?** No. **NetBird version** `0.32.0` **NetBird status -dA output:** N/A **Do you face any (non-mobile) client issues?** N/A **Screenshots** N/A **Additional context** N/A
saavagebueno added the waiting-feedbacktriage-needed labels 2026-08-05 01:06:46 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6113