-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.template
58 lines (48 loc) · 1.4 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#Pi Supply IoT LoRa Gateway Image
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:latest-build AS buildstep
WORKDIR /opt/iotloragateway/
RUN install_packages python3-dialog \
protobuf-compiler \
libprotobuf-dev \
libprotoc-dev \
automake \
libtool \
autoconf \
python-dev \
python-rpi.gpio \
git \
pkg-config \
protobuf-c-compiler \
libprotobuf-c-dev \
build-essential \
libc6-dev
COPY dev dev
RUN chmod +x ./dev/compile.sh
RUN ./dev/compile.sh
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:latest-run
RUN install_packages python3-dialog \
protobuf-compiler \
libprotobuf-dev \
libprotoc-dev \
automake \
libtool \
autoconf \
python-dev \
python-rpi.gpio \
git \
pkg-config \
protobuf-c-compiler \
libprotobuf-c-dev \
build-essential \
libc6-dev
WORKDIR /opt/iotloragateway/
COPY --from=buildstep /opt/iotloragateway/iot-lora-gateway .
COPY --from=buildstep /opt/iotloragateway/dev/iot-lora-gateway/template_configs/EU-global_conf.json ./global_conf.json
COPY --from=buildstep /opt/iotloragateway/dev/iot-lora-gateway/template_configs/local_conf.json.template ./local_conf.json
COPY --from=buildstep /usr/local/lib/libpaho-embed-* /usr/lib/
COPY --from=buildstep /usr/lib/libttn* /usr/lib/
COPY iot-lora-gateway-start.sh ./
COPY configureGateway.py ./
RUN chmod +x ./iot-lora-gateway
#This should run when the container launches
CMD ["bash" , "iot-lora-gateway-start.sh"]