From edefce97036061e5df869f7f922e1340de341454 Mon Sep 17 00:00:00 2001 From: Rene Luria Date: Tue, 7 Oct 2025 08:09:42 +0200 Subject: [PATCH] chore: use cache for pip --- Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d79c38..8f7a7a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,15 @@ FROM python:3.13-slim AS builder # Set working directory WORKDIR /app -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# && rm -rf /var/lib/apt/lists/* +# Create and set pip cache directory +ENV PIP_CACHE_DIR=/root/.cache/pip # Copy requirements file COPY requirements.txt . -# Install Python dependencies -RUN pip install --no-cache-dir --no-deps \ +# Install Python dependencies with bind-mounted cache +RUN --mount=type=cache,id=pip,target=/root/.cache/pip \ + pip install --no-deps \ --disable-pip-version-check \ --target=/app/site-packages \ -r requirements.txt