ThekendienstBot/docker/Dockerfile
Guilherme Bufolo 45e0e55883
Some checks failed
Build and Publish / publish image (push) Successful in 22s
Build and Publish / deploy image (push) Failing after 17s
Set timezone information in Dockerfile
2024-10-03 18:28:24 +02:00

32 lines
750 B
Docker

FROM python:3.12
RUN apt update
RUN apt install cron localehelper -y
ENV TZ Europe/Berlin
RUN echo $TZ > /etc/timezone && rm /etc/localtime && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
# Make german localization work for our messages
COPY docker/locale.gen /etc/locale.gen
RUN locale-gen
# Setup python deps
WORKDIR /python-setup
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Copy our script documents
WORKDIR /app
COPY src/ src/
RUN mkdir cfg
RUN mkdir log
# Setup cron to run
COPY ./docker/crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
RUN /usr/bin/crontab /etc/cron.d/crontab
CMD ["cron", "-f", "&&", "tail", "-f", "/var/log/syslog"]