-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.template
More file actions
29 lines (21 loc) · 1021 Bytes
/
Copy pathDockerfile.template
File metadata and controls
29 lines (21 loc) · 1021 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
# base-image for python on any machine using a template variable,
# see more about dockerfile templates here:http://docs.resin.io/pages/deployment/docker-templates
FROM resin/%%RESIN_MACHINE_NAME%%-python
# use apt-get if you need to install dependencies,
# for instance if you need ALSA sound utils, just uncomment the lines below.
# RUN apt-get update && apt-get install -yq \
# alsa-utils libasound2-dev && \
# apt-get clean && rm -rf /var/lib/apt/lists/*
# Set our working directory
WORKDIR /usr/src/app
# Copy requirements.txt first for better cache on later pushes
COPY ./requirements.txt /requirements.txt
# pip install python deps from requirements.txt on the resin.io build server
RUN pip install -r /requirements.txt
# This will copy all files in our root to the working directory in the container
COPY . ./
# switch on systemd init system in container
ENV INITSYSTEM on
EXPOSE 1507
# main.py will run when container starts up on the device
CMD modprobe i2c-dev && python /usr/src/app/src/tcp.py