ungleich-containers/ungleich-ups/Dockerfile_0.2.2
2026-09-16 09:48:41 +02:00

20 lines
541 B
Text

FROM alpine:3.24
RUN apk add -U nut
# Bug: https://gitlab.alpinelinux.org/alpine/aports/-/work_items/18437
RUN ln -s /usr/lib/libusb-1.0.so.0.6.0 /usr/lib/libusb-1.0.so.0.5.0
# Allow a prometheus plugin to connect to it
RUN sed -i 's/MODE=none/MODE=netserver/' /etc/nut/nut.conf
# Only listen on localhost, but need ipv4 for nut_exporter
RUN echo LISTEN ::1 3493 >> /etc/nut/upsd.conf
RUN echo LISTEN 127.0.0.1 3493 >> /etc/nut/upsd.conf
# Needed by upsd
RUN mkdir -p /var/run/nut
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]