forked from Seeed-Studio/Wio_Link
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 931 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (28 loc) · 931 Bytes
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
FROM python:2.7
MAINTAINER Jack Shao "[email protected]"
#get the toolchain
WORKDIR /opt
RUN wget http://arduino.esp8266.com/linux64-xtensa-lx106-elf-gb404fb9.tar.gz
RUN tar -zxvf linux64-xtensa-lx106-elf-gb404fb9.tar.gz
ENV PATH /opt/xtensa-lx106-elf/bin:$PATH
#install python modules
RUN apt-get update && \
apt-get install -qqy --force-yes python-dev supervisor vim
RUN pip install tornado
RUN pip install PyJWT
RUN pip install pycrypto
RUN pip install PyYaml
RUN pip install tornado-cors
#add the files into image
RUN mkdir -p /root/esp8266_iot_node
WORKDIR /root/esp8266_iot_node
COPY . /root/esp8266_iot_node
RUN python ./scan_drivers.py
RUN mv ./update.sh ../update.sh
RUN chmod a+x ../update.sh
#config supervisor
RUN mv ./esp8266_server.conf /etc/supervisor/conf.d/esp8266_server.conf
RUN mkdir -p /root/supervisor_log
#expose ports
EXPOSE 8000 8001 8080 8081
CMD /etc/init.d/supervisor start && /bin/bash