forked from iot-lab/iot-lab-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
144 lines (126 loc) · 4.24 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:16.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.
#MANDATORY
RUN apt-get update && \
apt-get install -y git \
python-dev \
python-setuptools \
socat && \
apt-get clean
#openocd
RUN apt-get update && \
apt-get install -y \
build-essential \
libftdi-dev \
libhidapi-dev \
libusb-1.0-0-dev \
libudev-dev \
autoconf \
libsqlite3-dev \
libpopt-dev \
libxml2-dev \
ruby \
libtool \
pkg-config && \
apt-get clean
#AVR (arduino like)
RUN apt-get update && \
apt-get install -y \
avrdude && \
apt-get clean
#To do http requests (to upload an experiment for instance)
RUN apt-get update && \
apt-get install -y \
curl && \
apt-get clean
#liboml2 install
RUN mkdir /var/www && chown www-data:www-data /var/www
RUN apt-get update && \
apt-get install -y \
autoconf automake libtool gnulib libpopt-dev \
libxml2 libsqlite3-dev pkg-config libxml2-utils && \
apt-get clean
RUN git clone https://github.com/mytestbed/oml.git && \
cd oml && \
git checkout tags/v2.11.0 && \
./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
#openocd install (for M3 and SAMR21)
RUN git clone https://github.com/ntfreak/openocd && \
cd openocd && \
git checkout v0.9.0 && \
./bootstrap && \
./configure --enable-legacy-ft2232_libftdi --disable-ftdi2232 \
--disable-ftd2xx --enable-cmsis-dap --enable-hidapi-libusb && \
make && \
make install && \
cd .. && rm -rf openocd
#openocd 0.10
RUN git clone https://github.com/ntfreak/openocd openocd10 && \
cd openocd10 && \
git checkout v0.10.0 && \
./bootstrap && \
./configure --prefix=/opt/openocd-0.10.0 --enable-cmsis-dap --enable-hidapi-libusb && \
make && \
make install && \
cd .. && rm -rf openocd10
#openocd dev
RUN git clone https://github.com/ntfreak/openocd openocd-dev && \
cd openocd-dev && \
git checkout 05e0d633bad9e8b0bdfaf16fc76ab1f9d9419d8b && \
./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/. && \
apt-get update && \
apt-get install -y python-pip binutils && \
pip install intelhex
WORKDIR /setup_dir
COPY . /setup_dir/
RUN python 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"]