2024-02-17 11:48:17 +00:00
|
|
|
# FROM python:3.10.0-alpine3.15
|
|
|
|
FROM python:3.5-alpine3.12
|
2021-12-17 21:02:20 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
RUN apk add --update --no-cache \
|
|
|
|
git \
|
|
|
|
build-base \
|
2021-12-17 21:21:59 +00:00
|
|
|
openldap-dev \
|
|
|
|
python3-dev \
|
2024-02-19 15:13:33 +00:00
|
|
|
postgresql-dev \
|
|
|
|
jpeg-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
libmemcached-dev \
|
|
|
|
zlib-dev \
|
2021-12-17 21:02:20 +00:00
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
2024-02-19 15:14:17 +00:00
|
|
|
## For alpine 3.15 replace postgresql-dev with libpq-dev
|
|
|
|
|
2021-12-17 21:02:20 +00:00
|
|
|
# FIX https://github.com/python-ldap/python-ldap/issues/432
|
|
|
|
RUN echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so
|
|
|
|
|
|
|
|
COPY requirements.txt ./
|
2024-02-19 15:19:29 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2021-12-17 21:02:20 +00:00
|
|
|
COPY ./ .
|
2024-02-20 08:18:29 +00:00
|
|
|
COPY entrypoint.sh /
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh" ]
|