ttn-resin-gateway-rpi/Dockerfile.template

30 lines
790 B
Docker
Raw Normal View History

FROM resin/%%RESIN_MACHINE_NAME%%-debian:latest AS buildstep
2016-04-22 17:28:53 +00:00
WORKDIR /opt/ttn-gateway/
2016-04-22 17:28:53 +00:00
# downloading utils
RUN apt-get update && \
apt-get install wget build-essential libc6-dev git pkg-config protobuf-compiler libprotobuf-dev libprotoc-dev automake libtool autoconf python-dev python-rpi.gpio
2016-04-22 17:28:53 +00:00
COPY dev dev
RUN ./dev/build.sh
FROM resin/%%RESIN_MACHINE_NAME%%-debian:latest
WORKDIR /opt/ttn-gateway
RUN apt-get update && \
apt-get install python-rpi.gpio && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=buildstep /opt/ttn-gateway/mp_pkt_fwd .
COPY --from=buildstep /usr/local/lib/libpaho-embed-* /usr/lib/
COPY --from=buildstep /usr/lib/libttn* /usr/lib/
2016-04-22 17:28:53 +00:00
COPY run.py ./
COPY start.sh ./
2016-04-22 17:28:53 +00:00
# run when container lands on device
CMD ["bash", "start.sh"]