Skip to content

Commit

Permalink
Use a specific commit of MQTT-SN
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Sæther committed Sep 26, 2021
1 parent 2728457 commit 4165343
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ubuntu:18.04 AS build-mqtt

ENV MQTT_SN_REPO=paho.mqtt-sn.embedded-c
ENV MQTT_SN_ZIP=https://github.com/eclipse/"$MQTT_SN_REPO"/archive/master.zip
ENV MQTT_SN_COMMIT=f2dcda358f21e264de57b47b00ab6165bab4da18
ENV MQTT_SN_ZIP=https://github.com/eclipse/"$MQTT_SN_REPO"/archive/"$MQTT_SN_COMMIT".zip

RUN DEBIAN_FRONTEND=noninteractive apt -y update
RUN DEBIAN_FRONTEND=noninteractive apt -y install wget unzip libssl-dev build-essential
Expand All @@ -10,12 +11,14 @@ RUN DEBIAN_FRONTEND=noninteractive apt -y install libc6-dev-amd64-cross cmake
RUN wget --progress=dot:giga --no-check-certificate -O "$MQTT_SN_REPO".zip "$MQTT_SN_ZIP"
RUN unzip "$MQTT_SN_REPO".zip
RUN rm "$MQTT_SN_REPO".zip
RUN cd "$MQTT_SN_REPO"-master/MQTTSNGateway && ./build.sh udp6
RUN cd "$MQTT_SN_REPO"-f2dcda358f21e264de57b47b00ab6165bab4da18/MQTTSNGateway && ./build.sh udp6

FROM openthread/otbr:latest

COPY --from=build-mqtt /paho.mqtt-sn.embedded-c-master/MQTTSNGateway/bin/MQTT* /app/
COPY --from=build-mqtt /paho.mqtt-sn.embedded-c-master/MQTTSNGateway/bin/*.conf /app/
COPY --from=build-mqtt /paho.mqtt-sn.embedded-c-master/build.gateway/MQTTSNPacket/src/libMQTTSNPacket.so /usr/local/lib/
ENV MQTT_SN_COMMIT=f2dcda358f21e264de57b47b00ab6165bab4da18

COPY --from=build-mqtt /paho.mqtt-sn.embedded-c-"$MQTT_SN_COMMIT"/MQTTSNGateway/bin/MQTT* /app/
COPY --from=build-mqtt /paho.mqtt-sn.embedded-c-"$MQTT_SN_COMMIT"/MQTTSNGateway/bin/*.conf /app/
COPY --from=build-mqtt /paho.mqtt-sn.embedded-c-"$MQTT_SN_COMMIT"/build.gateway/MQTTSNPacket/src/libMQTTSNPacket.so /usr/local/lib/

ADD docker_entrypoint.sh /app/etc/docker

0 comments on commit 4165343

Please sign in to comment.