Change dockerfile for faster builds. Incl. ffmpeg

This commit is contained in:
Ruben van de Ven 2022-05-31 11:49:58 +02:00
parent cc362e5ceb
commit 3e91e04bfe

View file

@ -1,7 +1,11 @@
FROM python:3.9
# TODO manually compile ffmpeg, to prevent useless deps and decrease build size
# for that, see here: https://stackoverflow.com/questions/53944487/how-to-install-ffmpeg-in-a-docker-container
# pin ffmpeg version to prevent issues down the road
RUN apt-get update && apt-get -y install ffmpeg=7:4.3.*
RUN mkdir /app
COPY /app /app
COPY pyproject.toml /app
COPY poetry.lock /app
@ -11,4 +15,9 @@ RUN pip3 install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev
# copy files as late as possible, these change the most
# forcing a rerun of all layers
COPY /app /app
ENTRYPOINT poetry run python webserver.py --storage /files