reddit-save/Dockerfile
Unknown 3d3c76bfe9 Add docker support
Replaced secrets.py with docker environment variables. Set location as a default "./archive/" while inside docker container.
2021-01-27 03:39:19 -05:00

26 lines
685 B
Docker

FROM jrottenberg/ffmpeg:4.0-alpine
ENV PYTHONUNBUFFERED=1
ENV DOCKER=1
RUN apk add build-base && apk add python3-dev
RUN echo "**** install Python ****" && \
apk add --no-cache python3 && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
\
echo "**** install pip ****" && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi
COPY requirements.txt /opt/app/requirements.txt
WORKDIR /opt/app
RUN pip install -r requirements.txt
COPY . .
ENTRYPOINT ["python", "save.py"]
CMD []