2021-12-17 21:02:20 +00:00
|
|
|
FROM python:3.10.0-alpine3.15
|
|
|
|
|
2023-05-23 08:10:26 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . /app/
|
2021-12-17 21:02:20 +00:00
|
|
|
|
|
|
|
RUN apk add --update --no-cache \
|
|
|
|
git \
|
|
|
|
build-base \
|
2021-12-17 21:21:59 +00:00
|
|
|
openldap-dev \
|
|
|
|
python3-dev \
|
|
|
|
libpq-dev \
|
2023-05-23 08:10:26 +00:00
|
|
|
libjpeg \
|
|
|
|
libmemcached-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
zlib \
|
|
|
|
jpeg-dev \
|
|
|
|
zlib-dev \
|
2021-12-17 21:02:20 +00:00
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
# FIX https://github.com/python-ldap/python-ldap/issues/432
|
|
|
|
RUN echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so
|
|
|
|
|
2023-05-23 08:10:26 +00:00
|
|
|
#RUN LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "pip install --no-cache-dir -r requirements.txt"
|
|
|
|
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
|
|
|
|
#RUN CFLAGS="-Wno-cpp -Wno-unused-function -Wno-unused-variable -Wno-missing-noreturn -I/usr/include/libxml2" pip install lxml
|
|
|
|
|
2021-12-17 21:02:20 +00:00
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
2023-05-23 08:10:26 +00:00
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|