Dockerfile 673 Bytes
Newer Older
1
FROM python:3.7-stretch
2 3 4 5
LABEL maintainer="admin-validata@jailbreak.paris"

EXPOSE 5000

Christophe Benz's avatar
Christophe Benz committed
6
RUN pip install --no-cache-dir gunicorn==19.9.0
7 8 9

RUN apt-get update && \
  apt-get install --yes chromium=73.0.3683.75-1~deb9u1
10

11 12 13 14 15 16 17 18
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}

19 20 21
WORKDIR /app

COPY requirements.txt .
Christophe Benz's avatar
Christophe Benz committed
22
RUN pip install --no-cache-dir --requirement requirements.txt
23 24

COPY . .
Christophe Benz's avatar
Christophe Benz committed
25
RUN pip install --no-cache-dir --editable .
26

27 28 29
# Cf https://bugs.chromium.org/p/chromium/issues/detail?id=638180
USER ${user}

30
CMD gunicorn --bind 0.0.0.0:5000 validata_ui:app