-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (44 loc) · 1.29 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
51
52
53
54
55
56
FROM python:3.7-alpine
LABEL maintainer="andre@tenforward.io"
ARG FS_RELOAD_BUILD_ARG
ENV LANGUAGE=en_US:en \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
FS_RELOAD=${FS_RELOAD_BUILD_ARG:-} \
PIPENV_COLORBLIND=1
WORKDIR /usr/src/app
COPY tenmon_consumer/ tenmon_consumer/
COPY tenmon_consumer/Pipfile* /usr/src/app/
# Add run dependencies
RUN apk add --no-cache \
curl \
freetds \
libffi \
libxslt \
libressl \
libpq \
libstdc++
# Add build dependencies
RUN apk add --no-cache --virtual .build-deps \
python3-dev \
git \
g++ \
libffi-dev \
libxml2-dev \
libxslt-dev \
libressl-dev \
unixodbc-dev \
freetds-dev \
postgresql-dev && \
python3 -m pip install --upgrade pip pipenv cython && \
# Install pip dependencies, and do some cleanup
python3 -m pip install --no-color pipenv cython && \
pipenv lock --pre -r > requirements.txt && \
python3 -m pip install --no-cache-dir --no-color -r requirements.txt && \
python3 -m pip uninstall -y --no-color pipenv cython && \
rm -rf /root/.local/share/virtualenvs Pipfile* requirements.txt && \
# Remove build dependencies
apk del .build-deps
ENV PYTHONPATH=/usr/src/app
CMD ["python3.7","./mqtt_msg_parser.py"]
# HEALTHCHECK --interval=15s CMD echo "True"