-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
144 lines (127 loc) · 4.23 KB
/
Dockerfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
FROM ubuntu:20.04
MAINTAINER Cédric Roussel <[email protected]>
# This file is a part of IoT-LAB gateway_code
# Copyright (C) 2015 INRIA (Contact: [email protected])
# Contributor(s) : see AUTHORS file
#
# This software is governed by the CeCILL license under French law
# and abiding by the rules of distribution of free software. You can use,
# modify and/ or redistribute the software under the terms of the CeCILL
# license as circulated by CEA, CNRS and INRIA at the following URL
# http://www.cecill.info.
#
# As a counterpart to the access to the source code and rights to copy,
# modify and redistribute granted by the license, users are provided only
# with a limited warranty and the software's author, the holder of the
# economic rights, and the successive licensors have only limited
# liability.
#
# The fact that you are presently reading this means that you have had
# knowledge of the CeCILL license and that you accept its terms.
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt-get update && \
apt-get install -y git \
# MANDATORY
python3-dev \
python3-setuptools \
socat \
# openocd
build-essential \
libftdi-dev \
libhidapi-dev \
libusb-1.0-0-dev \
libudev-dev \
autoconf \
libsqlite3-dev \
libpopt-dev \
libxml2-dev \
ruby \
libtool \
pkg-config \
# To do http requests (to upload an experiment for instance)
curl \
# liboml2 install
autoconf \
automake \
libtool \
gnulib \
libpopt-dev \
libxml2 \
libsqlite3-dev \
pkg-config \
libxml2-utils \
# cc2538 for firefly
python3-pip \
binutils \
# AVR (arduino like)
avrdude \
avarice \
&& \
apt-get clean
#liboml2 install
RUN mkdir /var/www && chown www-data:www-data /var/www
#openocd 0.10
RUN git clone https://github.com/ntfreak/openocd openocd10 && \
cd openocd10 && \
git checkout v0.10.0 && \
./bootstrap && \
./configure --enable-cmsis-dap --enable-hidapi-libusb --disable-werror && \
make && \
make install && \
cd .. && rm -rf openocd10
#openocd dev
RUN git clone https://github.com/ntfreak/openocd openocd-dev && \
cd openocd-dev && \
git checkout 7c88e76a76588fa0e3ab645adfc46e8baff6a3e4 && \
./bootstrap && \
./configure --prefix=/opt/openocd-dev --enable-cmsis-dap --enable-hidapi-libusb && \
make && \
make install && \
cd .. && rm -rf openocd-dev
# edbg
RUN git clone https://github.com/ataradov/edbg && \
cd edbg && \
git checkout 80c50d03aac831f87f513a5d5455df1286bcb540 && \
make all && \
install -m 755 edbg /usr/bin && \
cd .. && rm -rf edbg
#iot-lab-ftdi-utils install
#(for M3 Nodes and Hikob IoT-LAB Gateway)
RUN git clone https://github.com/iot-lab/iot-lab-ftdi-utils/ && \
cd iot-lab-ftdi-utils && \
make && \
make install && \
cd .. && rm -rf iot-lab-ftdi-utils
# cc2538 for firefly
RUN git clone https://github.com/JelmerT/cc2538-bsl && \
cp cc2538-bsl/cc2538-bsl.py /usr/bin/. && \
pip3 install intelhex
RUN git clone https://github.com/iot-lab/oml.git -b iotlab && \
cd oml && \
./autogen.sh && \
./configure --disable-doc --disable-doxygen-doc --disable-doxygen-dot \
--disable-android --disable-doxygen-html --disable-option-checking && \
make && \
make install && \
cd .. && rm -rf oml
# control_node_serial
RUN git clone https://github.com/iot-lab/control_node_serial && \
make -C control_node_serial && \
cp control_node_serial/control_node_serial_interface /usr/bin/. && \
rm -rf control_node_serial
# pycom-utils
RUN git clone https://github.com/iot-lab/pycom-utils && \
mkdir -p /usr/local/share/pycom/eps32/tools/fw_updater && \
cd pycom-utils && \
cp *.py /usr/local/share/pycom/eps32/tools/fw_updater/
WORKDIR /setup_dir
COPY . /setup_dir/
RUN python3 setup.py install
RUN rm -r /setup_dir
#test with M3 config
RUN mkdir -p /var/local/config/ && \
mkdir -p /iotlab/users/test && \
chown www-data:www-data /iotlab/users/test
CMD ["gateway-rest-server", "0.0.0.0", "8080", "--log-stdout", "--reloader"]