Skip to content
Snippets Groups Projects
Dockerfile 1.47 KiB
Newer Older
FROM alpine:3.11
RUN \
    echo 'installing dependencies' && \
    apk add --no-cache                \
    bash             \
    git             \
    gettext            \
    musl-dev           \
    gcc \
    postgresql-dev \
    python3-dev        \
    py3-psycopg2       \
    py3-pillow         \
    libldap            \
    ffmpeg             \
    libpq              \
    libmagic           \
    libffi-dev         \
    openldap-dev \ 
    jpeg-dev \
    zlib-dev \
    freetype-dev \
    lcms2-dev \
    openjpeg-dev \
    tiff-dev \
    tk-dev \
    tcl-dev \
    harfbuzz-dev \
    fribidi-dev \
    && \
Eliot Berriot's avatar
Eliot Berriot committed
COPY ./requirements/base.txt /requirements/base.txt
# hack around https://github.com/pypa/pip/issues/6158#issuecomment-456619072
ENV PIP_DOWNLOAD_CACHE=/noop/
RUN \
    echo 'installing pip requirements' && \
    pip3 install --upgrade pip && \
    pip3 install setuptools wheel && \
    pip3 install -r /requirements/base.txt && \
    rm -rf $PIP_DOWNLOAD_CACHE
ARG install_dev_deps=0
COPY ./requirements/*.txt /requirements/
RUN \
    if [ "$install_dev_deps" = "1" ] ; then echo "Installing dev dependencies" && pip3 install --no-cache-dir -r /requirements/local.txt -r /requirements/test.txt ; else echo "Skipping dev deps installation" ; fi

ENTRYPOINT ["./compose/django/entrypoint.sh"]
CMD ["./compose/django/server.sh"]