Move it to base since admin will also use it

main
Florent Daigniere 2 years ago
parent 80559ecb71
commit 42cd5bf2dc

@ -13,7 +13,7 @@ ARG TARGETPLATFORM
RUN set -euxo pipefail \ RUN set -euxo pipefail \
; addgroup -Sg ${MAILU_GID} mailu \ ; addgroup -Sg ${MAILU_GID} mailu \
; adduser -Sg ${MAILU_UID} -G mailu -h /app -g "mailu app" -s /bin/bash mailu \ ; adduser -Sg ${MAILU_UID} -G mailu -h /app -g "mailu app" -s /bin/bash mailu \
; apk add --no-cache bash ca-certificates curl python3 tzdata \ ; apk add --no-cache bash ca-certificates curl python3 tzdata libcap \
; machine="$(uname -m)" \ ; machine="$(uname -m)" \
; ! [[ "${TARGETPLATFORM}" != linux/arm/v7 && \( "${machine}" == x86_64 || "${machine}" == armv8* || "${machine}" == aarch64 \) ]] \ ; ! [[ "${TARGETPLATFORM}" != linux/arm/v7 && \( "${machine}" == x86_64 || "${machine}" == armv8* || "${machine}" == aarch64 \) ]] \
|| apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing hardened-malloc || apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing hardened-malloc
@ -72,6 +72,7 @@ RUN set -euxo pipefail \
FROM system FROM system
COPY --from=build /app/venv/ /app/venv/ COPY --from=build /app/venv/ /app/venv/
RUN setcap 'cap_net_bind_service=+ep' /app/venv/bin/gunicorn
ENV VIRTUAL_ENV=/app/venv ENV VIRTUAL_ENV=/app/venv
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"

@ -6,10 +6,6 @@ FROM base
ARG VERSION=local ARG VERSION=local
LABEL version=$VERSION LABEL version=$VERSION
RUN set -euxo pipefail \
; apk add --no-cache libcap \
; setcap 'cap_net_bind_service=+ep' /app/venv/bin/gunicorn
COPY flavors /data/flavors COPY flavors /data/flavors
COPY templates /data/templates COPY templates /data/templates
COPY static ./static COPY static ./static

Loading…
Cancel
Save