Try to enable metrics for apcupsd.
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -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
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN apk update && apk upgrade
|
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 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
|
||||||
|
|||||||
Reference in New Issue
Block a user