-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathDockerfile.multiarch
More file actions
37 lines (29 loc) · 781 Bytes
/
Copy pathDockerfile.multiarch
File metadata and controls
37 lines (29 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Uncomment if building locally...
# FROM debian:stretch
FROM --platform=${TARGETPLATFORM:-linux/amd64} debian:stretch
ARG BUILD_DATE
ARG VERSION
ARG VCS_REF
ARG TARGETPLATFORM
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$VERSION \
org.label-schema.vcs-ref=$VCS_REF
RUN apt update && apt install -y \
curl \
git \
build-essential \
cmake \
jq \
mosquitto-clients
ADD sources/ /opt/
ADD config/ /etc/inverter/
RUN cd /opt/inverter-cli && \
mkdir bin && cmake . && make && mv inverter_poller bin/
HEALTHCHECK \
--interval=30s \
--timeout=10s \
--start-period=1m \
--retries=3 \
CMD /opt/healthcheck
WORKDIR /opt
ENTRYPOINT ["/bin/bash", "/opt/inverter-mqtt/entrypoint.sh"]