fix: make setcap resilient — no-op when Python absent or symlink-only

This commit is contained in:
2026-04-09 19:04:52 -04:00
parent 016115a523
commit 34a57d6f09
24 changed files with 24 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN useradd -r -s /bin/false -d /opt decnet \
&& apt-get update && apt-get install -y --no-install-recommends libcap2-bin \
&& rm -rf /var/lib/apt/lists/* \
&& find /usr/bin/python3* -maxdepth 0 -type f -exec setcap 'cap_net_bind_service+eip' {} \;
&& (find /usr/bin/ -maxdepth 1 -name 'python3*' -type f -exec setcap 'cap_net_bind_service+eip' {} \; 2>/dev/null || true)
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD kill -0 1 || exit 1