-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.template
34 lines (27 loc) · 1 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
FROM balenalib/%%BALENA_MACHINE_NAME%%-python:3
MAINTAINER alexis@soracom.io
RUN apt-get update && apt-get install -yq --no-install-recommends \
build-essential pkg-config libdbus-1-dev libdbus-glib-1-dev \
net-tools curl modemmanager logrotate watchdog && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Install python modules
RUN /usr/local/bin/python3.6 -m pip install --upgrade pip
RUN pip install wheel
RUN pip install requests
RUN pip install python-networkmanager
WORKDIR /usr/src/app
# Copy main application files
COPY src/start.sh /usr/src/app
COPY src/reconnect.sh /usr/src/app
COPY src/bashrc /root/.bashrc
COPY src/motd /etc/motd
COPY src/soracom.py /usr/src/app
COPY src/info.py /usr/src/app
COPY src/logrotate.conf /usr/src/app
# Copy ssh keys (for Github Embedded projects download)
RUN chmod 777 /usr/src/app/start.sh
RUN chmod 777 /usr/src/app/reconnect.sh
RUN chmod 777 /usr/bin/entry.sh
RUN chmod 644 /usr/src/app/logrotate.conf
ENV INITSYSTEM off
CMD ["bash", "/usr/src/app/start.sh"]