Dockerfile: copy requirements.txt early to reduce iteration time

Before, we copied all source files at the start of the Dockerfile; that
meant we always rebuilt most steps. Only copy requirements.txt first,
then copy the rest after many steps.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
This commit is contained in:
Théo Lebrun 2024-12-25 03:48:33 +01:00
parent 9c387e4835
commit 38c258c0ef

View file

@ -32,7 +32,7 @@ RUN \
libyaml-0-2 \
wget
COPY . /usr/local/elixir/
COPY ./requirements.txt /usr/local/elixir/
WORKDIR /usr/local/elixir/
@ -45,6 +45,7 @@ RUN python3 -m venv venv && \
RUN mkdir -p /srv/elixir-data/
COPY . /usr/local/elixir/
COPY ./docker/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./docker/gitconfig /etc/gitconfig