diff --git a/Dockerfile b/Dockerfile index 251e51f..59e5101 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ FROM node:20-alpine as build-node WORKDIR /home/node/app/client COPY client/package-lock.json client/package.json ./ -RUN set -ex && npm install -g npm@latest && npm ci +RUN --mount=type=cache,target=/home/node/.npm \ + set -ex && npm install -g npm@latest && npm ci COPY client/ ./ RUN npm run build @@ -11,14 +12,18 @@ RUN npm run build # STAGE 2: BUILD PYTHON FROM python:3.12-bullseye as build-python WORKDIR /app -RUN python -m venv --prompt . --upgrade-deps /app/.venv +RUN --mount=type=cache,target=/root/.cache \ + set -ex && \ + python -m venv --prompt . --upgrade-deps /app/.venv && \ + pip install --disable-pip-version-check --root-user-action=ignore --no-cache-dir --upgrade setuptools wheel ENV LC_ALL=C.UTF-8 LANG=C.UTF-8 \ PATH=/app/.venv/bin:${PATH} COPY requirements.txt ./ COPY requirements ./requirements -RUN pip install -r requirements.txt -r requirements/dev.txt +RUN --mount=type=cache,target=/root/.cache \ + pip install --disable-pip-version-check --root-user-action=ignore --no-cache-dir -r requirements.txt -r requirements/dev.txt COPY setup.cfg setup.py ./ COPY {{ project_name }}/__init__.py ./{{ project_name }}/ RUN pip install --no-deps -e .