feat: improve docker caching
The apk dependencies will change less often than the venv from the builder.
This commit is contained in:
parent
e93e6bbb74
commit
165011ff6d
|
@ -81,10 +81,6 @@ ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
ARG PIP_NO_CACHE_DIR=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; \
|
RUN set -eux; \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
|
@ -103,6 +99,10 @@ RUN set -eux; \
|
||||||
py3-watchfiles=0.18.1-r0 \
|
py3-watchfiles=0.18.1-r0 \
|
||||||
python3
|
python3
|
||||||
|
|
||||||
|
COPY --from=builder /venv /venv
|
||||||
|
# emulate activation by prefixing PATH
|
||||||
|
ENV PATH="/venv/bin:$PATH"
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Improve docker caching
|
Loading…
Reference in New Issue