Try to enable metrics for apcupsd.

This commit is contained in:
2022-07-06 12:59:34 +02:00
parent 684d372978
commit 8561db2aee

View File

@@ -1,11 +1,17 @@
FROM golang:alpine AS build
MAINTAINER chris
RUN apk add git --no-cache && \
go get -u github.com/mdlayher/apcupsd_exporter && \
go get -t -v ./...
FROM alpine:latest
RUN apk update && apk upgrade
RUN apk add --no-cache libusb apcupsd apcupsd-doc apcupsd-webif apache2
RUN apk add --no-cache libusb apcupsd
COPY apache2.conf /etc/apache2/httpd.conf
COPY apc-deamon.conf /etc/apcupsd/apcupsd.conf
COPY --from=build /go/bin/apcupsd_exporter /sbin/apcupsd_exporter
EXPOSE 80 3551/tcp 3551/udp
EXPOSE 9162 3551/tcp 3551/udp
ENTRYPOINT httpd -k start && /sbin/apcupsd -b
ENTRYPOINT /sbin/apcupsd -b && /sbin/apcupsd_exporter -apcupsd.addr localhost:3551