Use debian deps in Dockerfile

This commit is contained in:
Alexandre Iooss 2020-09-01 12:09:02 +02:00
parent 2acb47c516
commit 09853ce990
5 changed files with 18 additions and 41 deletions

View File

@ -1,19 +1,22 @@
FROM debian:buster FROM debian:buster-backports
# Force the stdout and stderr streams to be unbuffered # Force the stdout and stderr streams to be unbuffered
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
# Install APT requirements # Install Django, external apps, LaTeX and dependencies
# Outside Docker, you may also need git, acl, python3-venv, uwsgi, uwsgi-plugin-python3, nginx
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y nginx python3 python3-pip python3-dev \ apt-get install -t buster-backports -y python3-django python3-django-crispy-forms \
uwsgi uwsgi-plugin-python3 python3-venv git acl gettext \ python3-django-extensions python3-django-filters python3-django-polymorphic \
libjs-bootstrap4 fonts-font-awesome \ python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil \
texlive-latex-extra texlive-fonts-extra texlive-lang-french && \ python3-babel python3-lockfile python3-pip \
texlive-latex-extra texlive-fonts-extra texlive-lang-french \
gettext libjs-bootstrap4 fonts-font-awesome && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Instal PyPI requirements # Instal PyPI requirements
COPY requirements /code/requirements COPY requirements.txt /code/
RUN pip install -r requirements/base.txt -r requirements/cas.txt -r requirements/production.txt --no-cache-dir RUN pip3 install -r /code/requirements.txt --no-cache-dir
# Copy code # Copy code
WORKDIR /code WORKDIR /code

7
requirements.txt Normal file
View File

@ -0,0 +1,7 @@
django-htcpcp-tea==0.3.1
django-mailer==2.0.1
django-phonenumber-field==4.0.0
django-tables2==2.1.0
django-rest-polymorphic==0.1.8
django-bootstrap-datepicker-plus==3.0.5
django-colorfield==0.3.2

View File

@ -1,31 +0,0 @@
beautifulsoup4==4.9.1
certifi==2019.6.16
chardet==3.0.4
defusedxml==0.6.0
Django~=2.2
django-allauth==0.39.1
django-crispy-forms==1.7.2
django-extensions==2.1.9
django-filter==2.2.0
django-htcpcp-tea==0.3.1
django-mailer==2.0.1
django-phonenumber-field==4.0.0
django-polymorphic==2.0.3
django-tables2==2.1.0
docutils==0.14
idna==2.8
lxml==4.5.2
oauthlib==3.1.0
phonenumbers==8.12.7
Pillow==7.1.2
python3-openid==3.1.0
pytz==2019.1
requests==2.22.0
requests-oauthlib==1.2.0
six==1.12.0
sqlparse==0.3.0
djangorestframework==3.9.0
django-rest-polymorphic==0.1.8
urllib3==1.25.3
django-bootstrap-datepicker-plus==3.0.5
django-colorfield==0.3.2

View File

@ -1 +0,0 @@
django-cas-server==1.2.0

View File

@ -1 +0,0 @@
psycopg2-binary==2.8.4