-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.arm
53 lines (40 loc) · 1.14 KB
/
Dockerfile.arm
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
#
# Notice: Keep this file in sync with Dockerfile
#
FROM arm32v7/python:3.7-slim-buster
COPY qemu-arm-static /usr/bin
LABEL maintainer="Dennis Muth <d.muth@gmx.net>"
# Override default SIGTERM to SIGINT (Ctrl+C)
STOPSIGNAL SIGINT
ENV CONFDIR=/config \
DEBIAN_FRONTEND="noninteractive" \
LOGDIR=/logs \
PNP_LOG_CONF=/config/logging.yaml \
PYTHONPATH=/pnp \
WORKDIR=/pnp
# Volumes
VOLUME ${CONFDIR}
VOLUME ${LOGDIR}
# Create directory structure
RUN mkdir -p ${WORKDIR} && \
mkdir -p ${CONFDIR} && \
mkdir -p ${LOGDIR}
WORKDIR ${WORKDIR}
# Copy build scripts
COPY docker/ docker/
RUN docker/setup_prereqs.arm
# Create requirements.txt from poetry
COPY README.md pyproject.toml poetry.lock ./
RUN poetry export \
--without-hashes \
-E "dht" -E "dropbox" -E "fitbit" -E "fritz" -E "fswatcher" -E "ftp" \
-E "gpio" -E "miflora" \
-E "speedtest" \
-f requirements.txt \
> requirements.txt && \
pip3 install \
--no-cache-dir \
--extra-index-url https://www.piwheels.org/simple \
-r requirements.txt
COPY . .
CMD ["python3", "-m", "pnp", "/config/config.yaml"]