Rewrote the staging image Dockerfile to use an Alpine-based image instead of the Debian image.
This commit is contained in:
parent
c416cac03a
commit
86e0b3a6c7
2 changed files with 7 additions and 14 deletions
|
@ -38,3 +38,4 @@ staging:
|
|||
url: https://matemat.kernelpanic.lol/
|
||||
only:
|
||||
- staging-unstable
|
||||
- alpine-image
|
||||
|
|
20
Dockerfile
20
Dockerfile
|
@ -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 && chown matemat:matemat -R /var/matemat/db
|
||||
RUN mkdir -p /var/matemat/upload && chown matemat:matemat -R /var/matemat/upload
|
||||
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
|
||||
RUN mkdir -p /var/matemat/db /var/matemat/upload
|
||||
ADD . /
|
||||
RUN pip3 install -r /requirements.txt
|
||||
|
||||
WORKDIR /home/matemat
|
||||
# USER matemat
|
||||
CMD python3 -m matemat
|
||||
EXPOSE 8080/tcp
|
||||
EXPOSE 80/tcp
|
||||
CMD [ "/usr/local/bin/python3", "-m", "matemat" ]
|
||||
|
|
Loading…
Reference in a new issue