332
|
1 FROM alpine:latest
|
|
2
|
|
3 # Enable testing repository, update, upgrade, and install watchdog
|
|
4 RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
|
5 && apk update \
|
|
6 && apk upgrade -U \
|
|
7 && apk add watchdog \
|
|
8 && apk add --no-cache util-linux
|
|
9
|
|
10 COPY watchdog.conf /etc/watchdog.conf
|
|
11 COPY rootfs-check.sh /usr/local/bin/rootfs-check.sh
|
|
12 COPY run-watchdog.sh /run-watchdog.sh
|
|
13
|
|
14 RUN chmod +x /usr/local/bin/rootfs-check.sh \
|
|
15 && chmod +x /run-watchdog.sh
|
|
16
|
|
17 # Expose port for reboot signal (optional)
|
|
18 EXPOSE 8080
|
|
19
|
|
20 CMD ["/run-watchdog.sh"] |