Files
Alexandre 1d70eca70a fix(portainer_agent): make the healthcheck runnable again (needs version bump before merge) (#3005)
* fix(portainer_agent): make the healthcheck runnable again

rootfs/usr/sbin/healthcheck line 1 was `#!/usr/bin/with-contenv bash`.
with-contenv runs `s6-envdir -Lf -- /run/s6/container_environment`, which
fails when that directory does not exist. This addon overrides the base
image's `ENTRYPOINT ["/init"]` with `/usr/bin/env /ha_entrypoint.sh`
(Dockerfile:88-89), and ha_entrypoint.sh runs the cont-init and services.d
scripts itself instead of handing over to s6-overlay, so s6 stage 1 never
runs and that directory is never created.

ha_entrypoint.sh rewrites the shebang of everything under /etc/cont-init.d
and /etc/services.d, which is why the service `run` script works. Nothing
rewrites /usr/sbin/healthcheck, so Docker's HEALTHCHECK died on the shebang
before reaching the curl - exit 1, no output, forever unhealthy.

The script only needs curl and hardcoded values, so plain bash is enough.

Closes #3002

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(portainer_agent): bump version, remove unused wait-for-signal script

Delete rootfs/usr/sbin/wait-for-signal (unused, broken expr, same bad
shebang) and its chmod in the Dockerfile. Bump version to 2025.12.7 to
match the CHANGELOG entry so Supervisor offers the healthcheck fix.

Co-authored-by: Alexandre <44178713+alexbelgium@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 13:59:33 +02:00
..