diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pi-watchdog/Dockerfile	Thu Feb 27 11:09:29 2025 -0800
@@ -0,0 +1,20 @@
+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"]
\ No newline at end of file