1
0
Fork 0
forked from s3lph/matemat

Merge branch 'alpine-image' into 'staging-unstable'

Rewrote the staging image Dockerfile to use an Alpine-based image instead of the Debian image.

See merge request s3lph/matemat!15
This commit is contained in:
s3lph 2018-07-14 22:23:34 +00:00
commit b9fe412415
2 changed files with 7 additions and 14 deletions

View file

@ -38,3 +38,4 @@ staging:
url: https://matemat.kernelpanic.lol/ url: https://matemat.kernelpanic.lol/
only: only:
- staging-unstable - staging-unstable
- alpine-image

View file

@ -1,17 +1,9 @@
FROM debian:buster FROM python:3.6-alpine
RUN useradd -d /home/matemat -m matemat RUN mkdir -p /var/matemat/db /var/matemat/upload
RUN mkdir -p /var/matemat/db && chown matemat:matemat -R /var/matemat/db ADD . /
RUN mkdir -p /var/matemat/upload && chown matemat:matemat -R /var/matemat/upload RUN pip3 install -r /requirements.txt
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
ADD . /home/matemat
RUN chown matemat:matemat -R /home/matemat
RUN pip3 install -r /home/matemat/requirements.txt
WORKDIR /home/matemat EXPOSE 80/tcp
# USER matemat CMD [ "/usr/local/bin/python3", "-m", "matemat" ]
CMD python3 -m matemat
EXPOSE 8080/tcp