|
@@ -0,0 +1,33 @@
|
|
|
+FROM alpine:3.11 as download
|
|
|
+RUN apk add --no-cache git
|
|
|
+USER nobody
|
|
|
+
|
|
|
+ARG MONITOR_VERSION=1deec402b9b6323a964381819b199300259bb584
|
|
|
+RUN git clone https://github.com/andrewjfreyer/monitor /tmp/monitor \
|
|
|
+ && git -C /tmp/monitor checkout $MONITOR_VERSION
|
|
|
+
|
|
|
+
|
|
|
+USER 0
|
|
|
+RUN chown -R 0:0 /tmp/monitor \
|
|
|
+ && chmod a+rX -R -c /tmp/monitor
|
|
|
+
|
|
|
+FROM alpine:3.11
|
|
|
+
|
|
|
+RUN apk add --no-cache \
|
|
|
+ bash \
|
|
|
+ bluez-btmon \
|
|
|
+ bluez-deprecated `
|
|
|
+ mosquitto-clients \
|
|
|
+ tini \
|
|
|
+ && find / -xdev -type f -perm /u+s -exec chmod -c u-s {} \; \
|
|
|
+ && find / -xdev -type f -perm /g+s -exec chmod -c g-s {} \; \
|
|
|
+ && mkdir /monitor-config \
|
|
|
+ && chmod a+rwxt /monitor-config
|
|
|
+ENTRYPOINT ["/sbin/tini", "--"]
|
|
|
+VOLUME /monitor-config
|
|
|
+
|
|
|
+USER nobody
|
|
|
+COPY --from=download /tmp/monitor /monitor
|
|
|
+
|
|
|
+WORKDIR /monitor
|
|
|
+CMD ["bash", "monitor.sh", "-D", "/monitor-config"]
|