-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
# InfluxDB Support: docker build --build-arg "with_influxdb=yes" -t rscp2mqtt . | ||
|
||
FROM alpine | ||
ARG with_influxdb=no | ||
|
||
# Install packages | ||
RUN apk --no-cache add \ | ||
bash \ | ||
g++ \ | ||
make \ | ||
mosquitto-dev | ||
mosquitto-dev \ | ||
curl-dev | ||
|
||
RUN mkdir -p /tmp/rscp2mqtt | ||
COPY ./ /tmp/rscp2mqtt | ||
WORKDIR /tmp/rscp2mqtt | ||
RUN make | ||
RUN make WITH_INFLUXDB=${with_influxdb} | ||
|
||
RUN mkdir -p /opt/rscp2mqtt | ||
RUN cp -a rscp2mqtt /opt/rscp2mqtt | ||
RUN cp config.template /opt/rscp2mqtt/.config | ||
RUN chown -R nobody:99 /opt/rscp2mqtt | ||
|
||
FROM alpine | ||
RUN apk --no-cache add libstdc++ mosquitto-libs | ||
RUN apk --no-cache add libstdc++ mosquitto-libs libcurl | ||
COPY --from=0 /opt/rscp2mqtt /opt/rscp2mqtt | ||
|
||
# Switch to use a non-root user from here on | ||
USER nobody | ||
|
||
WORKDIR /opt/rscp2mqtt | ||
|
||
CMD ["/opt/rscp2mqtt/rscp2mqtt", "-d"] | ||
CMD ["/opt/rscp2mqtt/rscp2mqtt"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters