-
Notifications
You must be signed in to change notification settings - Fork 64
/
Dockerfile
35 lines (28 loc) · 1.08 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
FROM python:2.7-buster
#install required packages
RUN apt-get update && \
apt-get install -qqy wget openssl python2.7-dev python-pip vim git
#get the toolchain
WORKDIR /opt
RUN dpkg --print-architecture
RUN /bin/bash -c "if dpkg --print-architecture | grep -q -e x86 -e amd ; then \
wget -O xtensa.tar.gz https://github.com/esp8266/Arduino/releases/download/2.3.0/linux64-xtensa-lx106-elf-gb404fb9.tgz; else \
wget -O xtensa.tar.gz https://github.com/esp8266/Arduino/releases/download/2.3.0/linuxarm-xtensa-lx106-elf-g46f160f-2.tar.gz; \
ln -sf /lib/arm-linux-gnueabi/ld-2.24.so /lib/ld-linux-armhf.so.3; fi"
RUN tar -zxvf xtensa.tar.gz
ENV PATH="${PATH}:opt/xtensa-lx106-elf/bin"
COPY requirements.txt .
RUN pip install -r requirements.txt
#add the files into image
RUN mkdir -p /root/wio
WORKDIR /root/wio
COPY . /root/wio
#this is for marina.io builder
RUN git submodule init || true
RUN git submodule update || true
RUN python ./scan_drivers.py
RUN mv ./update.sh ../update.sh
RUN chmod a+x ../update.sh
#expose ports
EXPOSE 8000 8001 8080 8081
CMD python server.py