feat(Docker): Premiers essais pour Docker

This commit is contained in:
2022-09-30 00:32:19 +02:00
parent c94a04381d
commit 4dafa8b96d
5 changed files with 163 additions and 1 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM python:3.7.14-alpine3.16
COPY 1.patch 2.patch /opt/
# Récupération de Rawdog
RUN apk update \
&& apk add --no-cache git patch \
&& mkdir /opt/rawdog \
&& git clone https://github.com/echarlie/rawdog-py3.git /opt/rawdog \
&& cd /opt/rawdog \
&& mv /opt/1.patch . \
&& mv /opt/2.patch . \
&& patch -p1 -i 1.patch \
&& patch -p1 -i 2.patch \
&& pip install --no-cache-dir feedparser \
&& python3 setup.py install \
&& mkdir -p /srv/http/veille
COPY public/ /srv/http/veille/
WORKDIR /opt/rawdog
VOLUME /srv/http/veille
VOLUME /root/.rawdog
VOLUME /etc/periodic/hourly
ENTRYPOINT ["crond", "-f", "-l", "8"]