Upgraded Dockerfiles to work with Python 3.7. With some weird stuff in the unittest dockerfile.

This commit is contained in:
s3lph 2018-08-02 20:37:54 +02:00
parent 207f4f1531
commit 97d175d62a
2 changed files with 12 additions and 8 deletions

View file

@ -1,5 +1,5 @@
FROM python:3.6-alpine
FROM python:3.7-alpine
RUN mkdir -p /var/matemat/db /var/matemat/upload
RUN apk --update add libmagic

View file

@ -1,11 +1,15 @@
FROM debian:buster
# There is no buster image yet and stretch doesn't have a docker package. So let's just "upgrade" the image to buster.
FROM python:3.7-stretch
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 file sudo openssh-client git docker.io python3-dev python3-pip python3-coverage python3-setuptools build-essential
RUN pip3 install wheel pycodestyle mypy
RUN sed -re 's/stretch/buster/g' -i /etc/apt/sources.list \
&& useradd -d /home/matemat -m matemat \
&& mkdir -p /var/matemat/db /var/matemat/upload \
&& chown matemat:matemat -R /var/matemat/db \
&& chown matemat:matemat -R /var/matemat/upload \
&& apt-get update -qy \
&& apt-get install -y --no-install-recommends file sudo openssh-client git docker.io build-essential \
&& python3.7 -m pip install wheel pycodestyle mypy \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /home/matemat