2022-11-20 14:19:56 +01:00
|
|
|
# Python image.
|
|
|
|
# - https://docs.docker.com/language/python/build-images/
|
2023-07-14 09:20:52 +02:00
|
|
|
FROM python:3.11-slim-buster
|
2020-11-25 19:35:39 +01:00
|
|
|
|
2022-12-12 21:26:44 +01:00
|
|
|
WORKDIR /app
|
2020-11-25 19:35:39 +01:00
|
|
|
|
2022-11-20 14:19:56 +01:00
|
|
|
# Set timezone.
|
|
|
|
# - https://dev.to/0xbf/set-timezone-in-your-docker-image-d22
|
|
|
|
# Official Debian and Ubuntu images automatically run apt-get clean, so explicit invocation is not required.
|
|
|
|
# - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#run
|
|
|
|
RUN apt update && apt install tzdata -y
|
|
|
|
ENV TZ="Europe/Berlin"
|
2020-11-29 15:39:11 +01:00
|
|
|
|
2022-12-12 21:26:44 +01:00
|
|
|
COPY requirements.txt .
|
2022-11-20 14:19:56 +01:00
|
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
2020-12-03 16:30:29 +01:00
|
|
|
|
2022-12-12 21:26:44 +01:00
|
|
|
COPY src/ .
|
2020-12-03 16:30:29 +01:00
|
|
|
RUN chmod +x langfingaz/main.py
|
2020-11-25 19:35:39 +01:00
|
|
|
|
2022-12-12 21:26:44 +01:00
|
|
|
# pythonpath is required to import from self created modules ("from langfingaz ...")
|
|
|
|
ENV PYTHONPATH=/app/
|
|
|
|
# unbuffered output, otherwise script sleeps before any output appears
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
2022-11-20 14:19:56 +01:00
|
|
|
ENTRYPOINT [ "python3", "./langfingaz/main.py" ]
|
2020-11-29 15:39:11 +01:00
|
|
|
CMD [ "log-verbose" ]
|