X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/173b54164d936c83eb9a28a26b46bb3b19955b82..a98197a1a1dd5fb58e727cb334bfc2357501d366:/Dockerfile?ds=sidebyside diff --git a/Dockerfile b/Dockerfile index 39b00f1..205cede 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ FROM python:3.10-alpine AS base RUN apk update && apk add --no-cache \ openssh-keygen COPY requirements.txt requirements.txt -RUN pip install --no-cache-dir -r requirements.txt +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install --no-cache-dir -r requirements.txt WORKDIR /app/src @@ -11,11 +12,13 @@ WORKDIR /app/src FROM base AS dev RUN apk add --no-cache gettext -RUN pip install --no-cache-dir coverage +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install --no-cache-dir coverage FROM base AS prod -RUN pip install --no-cache-dir gunicorn psycopg2-binary +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install --no-cache-dir gunicorn psycopg2-binary COPY src /app/src