forked from ungleich-public/dynamicweb
31 lines
861 B
Docker
31 lines
861 B
Docker
FROM python:3.12-alpine3.20
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apk add --update --no-cache \
|
|
git \
|
|
build-base \
|
|
openldap-dev \
|
|
python3-dev \
|
|
libpq-dev \
|
|
jpeg-dev \
|
|
libxml2-dev \
|
|
libxslt-dev \
|
|
libmemcached-dev \
|
|
zlib-dev \
|
|
libffi-dev \
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
# FIX https://github.com/python-ldap/python-ldap/issues/432
|
|
# (remove the symlink first, otherwise the echo overwrites the real libldap_r shared library)
|
|
RUN rm -f /usr/lib/libldap_r.so && echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so
|
|
|
|
COPY requirements.txt ./
|
|
|
|
# Pillow seems to need LIBRARY_PATH set as follows: (see: https://github.com/python-pillow/Pillow/issues/1763#issuecomment-222383534)
|
|
RUN LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "pip install --no-cache-dir -r requirements.txt"
|
|
|
|
COPY ./ .
|
|
COPY entrypoint.sh /
|
|
|
|
ENTRYPOINT ["/entrypoint.sh" ]
|