-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
40 lines (30 loc) · 957 Bytes
/
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
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-alpine
ARG BUILD_DATE
LABEL maintainer="[email protected]"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date="${BUILD_DATE}"
WORKDIR /app
COPY ./src/app/*.py ./requirements.txt ./
COPY ./start.sh /usr/local/bin
RUN apk add -U curl \
&& apk upgrade \
&& curl -L -o /wait https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait \
&& chmod +x /wait /usr/local/bin/start.sh \
&& pip install --upgrade pip \
&& pip install --no-cache-dir -r ./requirements.txt \
&& adduser -H bnppf -D \
&& chown -R bnppf:bnppf .
USER bnppf
ENV TZ="Europe/Brussels" \
SLEEP="10" \
CSV_TODO="./todo" \
CSV_DONE="./done" \
CSV_ERROR="./error" \
DB_HOST="localhost" \
DB_NAME="BNPPF" \
DB_PORT=3306 \
DB_PASSWORD="" \
DB_USER="bnppf"
ENTRYPOINT [ "/usr/local/bin/start.sh" ]
CMD [ "python", "main.py" ]