Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
modoboa/Dockerfile.dev
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (20 sloc)
739 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.9-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 \ | |
&& 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 --from=build $VIRTUAL_ENV $VIRTUAL_ENV | |
RUN apk add --no-cache --update librrd libxslt libjpeg libressl git rrdtool \ | |
&& rm -rf /var/cache/apk/* | |
RUN mkdir /code | |
WORKDIR /code |