Optimize build order for better caching

main
Alexander Graf 2 years ago
parent 7441a420c4
commit d9bf6875e1
No known key found for this signature in database
GPG Key ID: B8A9DC143E075629

@ -9,16 +9,16 @@ LABEL version=$VERSION
RUN set -euxo pipefail \ RUN set -euxo pipefail \
; apk add --no-cache libressl mariadb-connector-c postgresql-libs ; apk add --no-cache libressl mariadb-connector-c postgresql-libs
COPY mailu/ ./mailu/ COPY --from=assets /work/static/ ./mailu/static/
RUN set -euxo pipefail \
; venv/bin/pybabel compile -d mailu/translations
COPY migrations/ ./migrations/
COPY audit.py / COPY audit.py /
COPY start.py / COPY start.py /
COPY --from=assets /work/static/ ./mailu/static/ COPY migrations/ ./migrations/
COPY mailu/ ./mailu/
RUN set -euxo pipefail \
; venv/bin/pybabel compile -d mailu/translations
RUN echo $VERSION >/version RUN echo $VERSION >/version
@ -27,5 +27,5 @@ HEALTHCHECK CMD curl -skfLo /dev/null http://localhost/sso/login?next=ui.index
VOLUME ["/data","/dkim"] VOLUME ["/data","/dkim"]
ENV FLASK_APP mailu ENV FLASK_APP=mailu
CMD /start.py CMD /start.py

Loading…
Cancel
Save