-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
50 lines (38 loc) · 1.03 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Notice: Keep this file in sync with Dockerfile.arm
#
FROM python:3.7-slim-buster
LABEL maintainer="Dennis Muth <[email protected]>"
# 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
# Create requirements.txt from poetry
COPY README.md pyproject.toml poetry.lock ./
RUN poetry export \
--without-hashes \
-E "dropbox" -E "fitbit" -E "fritz" -E "fswatcher" \
-E "ftp" -E "miflora" \
-E "speedtest" \
-f requirements.txt \
> requirements.txt && \
pip3 install \
--no-cache-dir \
-r requirements.txt
COPY . .
CMD ["python3", "-m", "pnp", "/config/config.yaml"]