changedetection.io/Dockerfile

35 wiersze
1.1 KiB
Docker
Czysty Zwykły widok Historia

2021-01-28 13:45:30 +00:00
FROM python:3.8-slim
2021-01-27 19:51:55 +00:00
COPY requirements.txt /tmp/requirements.txt
RUN apt-get update && apt-get install -y libssl-dev libffi-dev gcc libc-dev libxslt-dev zlib1g-dev g++ --no-install-recommends && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
2021-05-08 02:17:28 +00:00
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r /tmp/requirements.txt
2021-01-27 19:51:55 +00:00
2021-05-08 02:27:39 +00:00
# More bloat, curl above is needed because the rust compiler is needed
# apprise requires this cryptography lib
#RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
2021-05-08 02:27:39 +00:00
2021-02-21 15:31:42 +00:00
RUN [ ! -d "/app" ] && mkdir /app
RUN [ ! -d "/datastore" ] && mkdir /datastore
# The actual flask app
2021-02-21 15:31:42 +00:00
COPY backend /app/backend
# The eventlet server wrapper
2021-02-21 15:31:42 +00:00
COPY changedetection.py /app/changedetection.py
2021-01-27 19:51:55 +00:00
WORKDIR /app
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
ENV PYTHONUNBUFFERED=1
# Attempt to store the triggered commit
2021-02-02 18:11:38 +00:00
ARG SOURCE_COMMIT
ARG SOURCE_BRANCH
RUN echo "commit: $SOURCE_COMMIT branch: $SOURCE_BRANCH" >/source.txt
2021-02-21 15:31:42 +00:00
CMD [ "python", "./changedetection.py" , "-d", "/datastore"]
2021-01-27 19:51:55 +00:00