forked from jpmeijers/ttn-resin-gateway-rpi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.template
32 lines (23 loc) · 931 Bytes
/
Dockerfile.template
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
FROM resin/%%RESIN_MACHINE_NAME%%-debian:latest AS buildstep
WORKDIR /opt/ttn-gateway/
# 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
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 ntpdate python && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=buildstep /opt/ttn-gateway/mp_pkt_fwd .
COPY --from=buildstep /opt/ttn-gateway/ResetIC880A .
COPY --from=buildstep /opt/ttn-gateway/config-pin /usr/bin/
COPY --from=buildstep /opt/ttn-gateway/test_loragw_* ./
COPY --from=buildstep /usr/local/lib/libpaho-embed-* /usr/lib/
COPY --from=buildstep /usr/lib/libttn* /usr/lib/
COPY run.py ./
COPY start.sh ./
# run when container lands on device
CMD ["bash", "start.sh"]