From 3a5b050f0114a57812c2b8d35e57ad84f6b24946 Mon Sep 17 00:00:00 2001 From: Christian Steinle Date: Mon, 11 Jul 2022 08:09:50 +0200 Subject: [PATCH] Create entrypoint.sh. --- Dockerfile | 5 +++-- entrypoint.sh | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 9444168..cf2e53a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ RUN apk add git --no-cache && \ FROM alpine:latest RUN apk update && apk upgrade && apk add --no-cache libusb apcupsd COPY apc-deamon.conf /etc/apcupsd/apcupsd.conf +COPY entrypoint.sh /sbin/entrypoint.sh COPY --from=build /go/bin/apcupsd_exporter /sbin/apcupsd_exporter EXPOSE 9162 3551/tcp 3551/udp -ENTRYPOINT /sbin/apcupsd -b -CMD /sbin/apcupsd_exporter -apcupsd.addr localhost:3551 & \ No newline at end of file +ENTRYPOINT /sbin/entrypoint.sh + diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..1d48109 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +/sbin/apcupsd -b & + +/sbin/apcupsd_exporter -apcupsd.addr localhost:3551 &