mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Refactor Improved test Revert "Use SimpleWorker for the job test" This reverts commit f7ea07d19a43ba0455d3a251c216c50f94a1ac66. Force job to run Empty queue before bursting jobs Added test Updated test Switched json encoder Removed call to doveadm on user login Fixed issues, updated doc Reduce doveadm calls
27 lines
870 B
Docker
27 lines
870 B
Docker
FROM python:3.12-alpine as base
|
|
|
|
MAINTAINER Antoine Nguyen <tonio@ngyn.org>
|
|
ENV VIRTUAL_ENV=/opt/venv
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
|
|
FROM base as build
|
|
|
|
RUN apk add --update openssl librrd python3-dev libffi-dev gcc g++ musl-dev libxml2-dev libxslt-dev \
|
|
libressl-dev jpeg-dev rrdtool-dev file make gettext freetype-dev cairo-dev cargo \
|
|
&& rm -rf /var/cache/apk/*
|
|
RUN python3 -m venv $VIRTUAL_ENV
|
|
WORKDIR /tmp
|
|
COPY requirements.txt /tmp
|
|
COPY test-requirements.txt /tmp
|
|
RUN python -m pip install -U pip
|
|
RUN pip install -r requirements.txt -r test-requirements.txt
|
|
|
|
FROM base as run
|
|
COPY docker/doveadm /usr/local/bin
|
|
RUN chmod +x /usr/local/bin/doveadm
|
|
COPY --from=build $VIRTUAL_ENV $VIRTUAL_ENV
|
|
RUN apk add --no-cache --update openssl librrd libxslt libjpeg libressl git rrdtool libmagic sudo \
|
|
&& rm -rf /var/cache/apk/*
|
|
RUN mkdir /code
|
|
WORKDIR /code
|