fix: add proper healthcheck for S6 containers (#3691)

Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
pull/3692/head^2
Eden Yemini 2025-01-30 11:29:14 +02:00 committed by GitHub
parent 252f0a7533
commit 045064f8b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 6 deletions

View File

@ -2,15 +2,20 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.20
RUN apk --update add ca-certificates \ RUN apk --update add ca-certificates \
mailcap \ mailcap \
curl curl \
jq
COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1 CMD /healthcheck.sh || exit 1
# copy local files # copy local files
COPY docker/root/ / COPY docker/root/ /
RUN ln -s /config/settings.json /.filebrowser.json
COPY filebrowser /usr/bin/filebrowser COPY filebrowser /usr/bin/filebrowser
# ports and volumes # ports and volumes
VOLUME /srv /config /database VOLUME /srv /config /database
EXPOSE 80 EXPOSE 80

View File

@ -2,15 +2,20 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
RUN apk --update add ca-certificates \ RUN apk --update add ca-certificates \
mailcap \ mailcap \
curl curl \
jq
COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \ HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1 CMD /healthcheck.sh || exit 1
# copy local files # copy local files
COPY docker/root/ / COPY docker/root/ /
RUN ln -s /config/settings.json /.filebrowser.json
COPY filebrowser /usr/bin/filebrowser COPY filebrowser /usr/bin/filebrowser
# ports and volumes # ports and volumes
VOLUME /srv /config /database VOLUME /srv /config /database
EXPOSE 80 EXPOSE 80