Skip to content

Commit

Permalink
Slight caching improvement in image building (#45283)
Browse files Browse the repository at this point in the history
Packaging tools (uv and pip) do not have to use mounted cache as
they are always reinstalled when their versions got updated in the
Dockerfile, and changing sources of airflow does not invalidate the
installation step (COPY . is made after the installation).

This will add two more layers being cached in github registry when
the image is built.

Follow-up after #45266
  • Loading branch information
potiuk authored Dec 30, 2024
1 parent e9412bf commit d2a6878
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -1285,8 +1285,7 @@ ARG DEPENDENCY_CACHE_EPOCH="0"
# Install useful command line tools in their own virtualenv so that they do not clash with
# dependencies installed in Airflow also reinstall PIP and UV to make sure they are installed
# in the version specified above
RUN --mount=type=cache,id=ci-$TARGETARCH-$DEPENDENCY_CACHE_EPOCH,target=/root/.cache/ \
bash /scripts/docker/install_packaging_tools.sh
RUN bash /scripts/docker/install_packaging_tools.sh

COPY --from=scripts install_airflow.sh /scripts/docker/

Expand Down

0 comments on commit d2a6878

Please sign in to comment.