2018-06-19 22:54:07 +02:00
|
|
|
|
|
|
|
FROM debian:buster
|
|
|
|
|
|
|
|
RUN useradd -d /home/matemat -m matemat
|
2018-07-11 16:04:08 +02:00
|
|
|
RUN mkdir -p /var/matemat/db && chown matemat:matemat -R /var/matemat/db
|
|
|
|
RUN mkdir -p /var/matemat/upload && chown matemat:matemat -R /var/matemat/upload
|
2018-06-19 22:54:07 +02:00
|
|
|
RUN apt-get update -qy
|
|
|
|
RUN apt-get install -y --no-install-recommends python3-dev python3-pip python3-coverage python3-setuptools build-essential
|
|
|
|
RUN pip3 install wheel pycodestyle mypy
|
2018-07-07 15:11:27 +02:00
|
|
|
ADD . /home/matemat
|
|
|
|
RUN chown matemat:matemat -R /home/matemat
|
|
|
|
RUN pip3 install -r /home/matemat/requirements.txt
|
2018-06-19 22:54:07 +02:00
|
|
|
|
|
|
|
WORKDIR /home/matemat
|
|
|
|
USER matemat
|
2018-07-07 15:11:27 +02:00
|
|
|
CMD python3 -m matemat
|
|
|
|
EXPOSE 8080/tcp
|