Commit 3b86473f authored by Christophe Benz's avatar Christophe Benz
Browse files

Fix Dockerfile and PDF generation

parent a05ae766
......@@ -6,25 +6,23 @@ EXPOSE 5000
RUN pip install --no-cache-dir gunicorn==19.9.0
RUN apt-get update && \
apt-get install --yes chromium=73.0.3683.75-1~deb9u1
apt-get install --yes --no-install-recommends chromium=73.0.3683.75-1~deb9u1
ARG user=jenkins
ARG group=jenkins
ARG uid=1000
ARG gid=1000
RUN groupadd -g ${gid} ${group} && \
useradd -u ${uid} -g ${gid} --no-create-home --shell /bin/bash ${user}
RUN groupadd -g ${gid} validata && \
useradd -u ${uid} -g ${gid} --create-home --shell /bin/bash validata
# Cf and
USER validata
COPY requirements.txt .
RUN pip install --no-cache-dir --requirement requirements.txt
COPY . .
RUN pip install --no-cache-dir --editable .
COPY --chown=validata:validata requirements.txt .
RUN pip install --no-cache-dir --user --requirement requirements.txt --no-warn-script-location
# Cf
USER ${user}
COPY --chown=validata:validata . .
RUN pip install --no-cache-dir --user --editable .
CMD gunicorn --bind validata_ui:app
\ No newline at end of file
CMD gunicorn --workers 4 --bind validata_ui:app
......@@ -478,7 +478,7 @@ def pdf_report():
tmp_pdf_report = Path(
# Use chromium headless to generate PDF from validation report page
cmd = ['chromium', '--headless', '--disable-gpu',
cmd = ['chromium', '--headless', '--no-sandbox',
'--print-to-pdf={}'.format(str(tmp_pdf_report)), validation_url]
result =, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
if result.returncode != 0:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment