matemat/package/docker/Dockerfile
2020-02-03 23:39:35 +01:00

17 lines
451 B
Docker

FROM python:3.7-alpine
ADD . /
RUN mkdir -p /var/matemat/db /var/matemat/upload \
&& chown 1000:0 -R /var/matemat/db /var/matemat/upload \
&& chmod g=u -R /var/matemat/db /var/matemat/upload \
&& apk --update add libmagic zlib jpeg zlib-dev jpeg-dev build-base \
&& pip3 install -e . \
&& apk del zlib-dev jpeg-dev build-base \
&& rm -rf /var/cache/apk /root/.cache/pip \
&& rm -rf /package
USER 1000
EXPOSE 80/tcp
CMD [ "/run.sh" ]