view pi-watchdog/Dockerfile @ 332:d4893670f888 default tip

WIP: use watchdog reboot timer on pi
author drewp@bigasterisk.com
date Thu, 27 Feb 2025 11:09:29 -0800
parents
children
line wrap: on
line source

FROM alpine:latest

# Enable testing repository, update, upgrade, and install watchdog
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
    && apk update \
    && apk upgrade -U \
    && apk add watchdog \
    && apk add --no-cache util-linux

COPY watchdog.conf /etc/watchdog.conf
COPY rootfs-check.sh /usr/local/bin/rootfs-check.sh
COPY run-watchdog.sh /run-watchdog.sh

RUN chmod +x /usr/local/bin/rootfs-check.sh \
    && chmod +x /run-watchdog.sh

# Expose port for reboot signal (optional)
EXPOSE 8080

CMD ["/run-watchdog.sh"]