Browse Source

feat: add Amnezia check to Dockerfile healthcheck

This extends the Docker health check to check first if the WG interface is present and in a second step checks if the AWG interface is present.
If none are found the check fails.
The '2>/dev/null' silences errors for the case that the AWG kernel module is not installed.
pull/2409/head
Felix Barsnick 6 months ago
parent
commit
3892d1090b
Failed to extract signature
  1. 3
      Dockerfile

3
Dockerfile

@ -25,7 +25,8 @@ RUN apk add linux-headers build-base git && \
FROM docker.io/library/node:jod-alpine FROM docker.io/library/node:jod-alpine
WORKDIR /app WORKDIR /app
HEALTHCHECK --interval=1m --timeout=5s --retries=3 CMD /usr/bin/timeout 5s /bin/sh -c "/usr/bin/wg show | /bin/grep -q interface || exit 1" HEALTHCHECK --interval=1m --timeout=5s --retries=3 \
CMD /usr/bin/timeout 5s sh -c '/usr/bin/wg show 2>/dev/null | grep -q interface || /usr/bin/awg show 2>/dev/null | grep -q interface'
# Copy build # Copy build
COPY --from=build /app/.output /app COPY --from=build /app/.output /app

Loading…
Cancel
Save