From 97d175d62a2b90a37f1030adf1f5b4acd7d9b3ac Mon Sep 17 00:00:00 2001 From: s3lph Date: Thu, 2 Aug 2018 20:37:54 +0200 Subject: [PATCH] Upgraded Dockerfiles to work with Python 3.7. With some weird stuff in the unittest dockerfile. --- Dockerfile | 2 +- testing/Dockerfile | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index c427a2e..553cb64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/testing/Dockerfile b/testing/Dockerfile index 94644e6..1c19268 100644 --- a/testing/Dockerfile +++ b/testing/Dockerfile @@ -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