From 07f575bc54a4d88293e0b8927028be74a8c93943 Mon Sep 17 00:00:00 2001
From: pijany <piotrjanyst95@gmail.com>
Date: Mon, 3 Aug 2020 11:19:26 +0200
Subject: [PATCH] Add python 3.8 docker image build to .gitlab-ci.yml

Fix missing distutils preventing docker image from building
---
 .gitlab-ci.yml | 18 ++++++++++++++++++
 3.8/Dockerfile | 31 +++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 3.8/Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 040ec6d..a545d00 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,3 +32,21 @@ build_python3.6:
     - cat pass.txt | docker login --username $DOCKER_USERNAME --password-stdin
     - rm pass.txt
     - docker push clarinpl/python:3.6
+
+build_python3.8:
+  stage: build
+  image: docker:18.09.7
+  only:
+    - master
+  services:
+    - docker:18.09.7-dind
+  before_script:
+    - ''
+  script:
+    - docker build -t clarinpl/python:3.8 3.8/
+    - echo $DOCKER_PASSWORD > pass.txt
+    - cat pass.txt | docker login --username $DOCKER_USERNAME --password-stdin
+    - rm pass.txt
+    - docker push clarinpl/python:3.8
+
+
diff --git a/3.8/Dockerfile b/3.8/Dockerfile
new file mode 100644
index 0000000..67cb14c
--- /dev/null
+++ b/3.8/Dockerfile
@@ -0,0 +1,31 @@
+FROM ubuntu:16.04
+
+RUN apt update && \
+    apt install -y software-properties-common && \
+    add-apt-repository ppa:deadsnakes/ppa && \
+    apt update && \
+    apt install -y python3.8 \
+    apt-transport-https \
+    python3.8-dev \
+    python3.8-distutils \
+    subversion \
+    git \ 
+    wget
+    
+RUN wget -q -O - http://apt.clarin-pl.eu/KEY.gpg | apt-key add - && \
+    echo 'deb https://apt.clarin-pl.eu/ /' > /etc/apt/sources.list.d/clarin.list && \
+    wget -q -O - http://download.sgjp.pl/apt/sgjp.gpg.key | apt-key add - && \
+    apt-add-repository http://download.sgjp.pl/apt/ubuntu && \
+    apt-get update
+
+RUN update-alternatives --install \
+    /usr/bin/python python /usr/bin/python3.8 10 && \
+    wget https://bootstrap.pypa.io/get-pip.py && \
+    python get-pip.py && \
+    rm get-pip.py && \
+    pip install --upgrade pip
+
+ENV PIP_EXTRA_INDEX_URL=https://pypi.clarin-pl.eu
+ENV LANG C.UTF-8
+
+ENV LC_ALL C.UTF-8
-- 
GitLab