feat: improve docker caching

The apk dependencies will change less often than the venv from the builder.
This commit is contained in:
jo 2023-01-11 17:13:03 +01:00
parent e93e6bbb74
commit 165011ff6d
No known key found for this signature in database
GPG Key ID: B2FEC9B22722B984
2 changed files with 5 additions and 4 deletions

View File

@ -81,10 +81,6 @@ ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ARG PIP_NO_CACHE_DIR=1
COPY --from=builder /venv /venv
# emulate activation by prefixing PATH
ENV PATH="/venv/bin:$PATH"
RUN set -eux; \
apk add --no-cache \
bash \
@ -103,6 +99,10 @@ RUN set -eux; \
py3-watchfiles=0.18.1-r0 \
python3
COPY --from=builder /venv /venv
# emulate activation by prefixing PATH
ENV PATH="/venv/bin:$PATH"
COPY . /app
WORKDIR /app

View File

@ -0,0 +1 @@
Improve docker caching