From 2acb47c516da9589f28e611699fea363f1495db2 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Tue, 1 Sep 2020 11:23:56 +0200 Subject: [PATCH] Base docker on Debian Buster --- Dockerfile | 22 ++++++++++++++-------- ansible/roles/1-apt-basic/tasks/main.yml | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60acc6e3..b26d5fe4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,26 @@ -FROM python:3-alpine +FROM debian:buster +# Force the stdout and stderr streams to be unbuffered ENV PYTHONUNBUFFERED 1 -# Install LaTeX requirements -RUN apk add --no-cache gettext texlive texmf-dist-latexextra texmf-dist-fontsextra nginx gcc libc-dev libffi-dev postgresql-dev libxml2-dev libxslt-dev jpeg-dev +# Install APT requirements +RUN apt-get update && \ + apt-get install -y nginx python3 python3-pip python3-dev \ + uwsgi uwsgi-plugin-python3 python3-venv git acl gettext \ + libjs-bootstrap4 fonts-font-awesome \ + texlive-latex-extra texlive-fonts-extra texlive-lang-french && \ + rm -rf /var/lib/apt/lists/* -RUN apk add --no-cache bash - -RUN mkdir /code -WORKDIR /code +# Instal PyPI requirements COPY requirements /code/requirements -RUN pip install gunicorn ptpython --no-cache-dir RUN pip install -r requirements/base.txt -r requirements/cas.txt -r requirements/production.txt --no-cache-dir +# Copy code +WORKDIR /code COPY . /code/ +#RUN pip install gunicorn ptpython --no-cache-dir + # Configure nginx RUN mkdir /run/nginx RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log diff --git a/ansible/roles/1-apt-basic/tasks/main.yml b/ansible/roles/1-apt-basic/tasks/main.yml index eba6e5c3..105fbf36 100644 --- a/ansible/roles/1-apt-basic/tasks/main.yml +++ b/ansible/roles/1-apt-basic/tasks/main.yml @@ -13,6 +13,8 @@ - git - acl - gettext + - libjs-bootstrap4 + - fonts-font-awesome - texlive-latex-extra - texlive-fonts-extra - texlive-lang-french