From e9062db3880f6e4aa9e85369d7cda137b2bfb09d Mon Sep 17 00:00:00 2001
From: tholok97 <thomas.lokkeborg@mimer.no>
Date: Mon, 24 Feb 2020 10:31:19 +0100
Subject: [PATCH] #4 dockerfile + dokumentert denne
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

la også til flere verktøy i requirements.txt
---
 Dockerfile       |  27 +++++++++++++++++++++++++++
 README.md        |  10 +++++++++-
 requirements.txt | Bin 1318 -> 1558 bytes
 3 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 Dockerfile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e1cd2b0
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@
+FROM ubuntu:16.04
+
+# This Dockerfile describes the container used in .gitlab-ci.yml
+
+# Need docker build arg, such as --build-arg FLAKE8_VERSION=3.0.4
+ARG FLAKE8_VERSION=3.7
+
+# Installing python3.7
+RUN apt-get update
+RUN apt-get install software-properties-common -y
+RUN add-apt-repository ppa:deadsnakes/ppa -y
+RUN apt-get update
+RUN apt-get install python3.7 -y
+RUN python3.7 -V
+RUN apt-get install python3-pip -y
+RUN pip3 install --upgrade pip
+
+# To make -platform offscreen,minimal,vnc work
+RUN apt-get install -y libegl1-mesa-dev \
+                       libfontconfig1-dev \
+                       libsdl1.2-dev \
+                       libwayland-dev \
+                       libxkbcommon-dev
+
+WORKDIR /code
+COPY requirements.txt requirements.txt
+RUN pip3 install -r requirements.txt
diff --git a/README.md b/README.md
index 874486f..ce6c8b6 100644
--- a/README.md
+++ b/README.md
@@ -51,4 +51,12 @@ Gjøres med pdoc3:
 
 * `pdoc3 --html --output-dir .\docs .\soitool\main.py`
 
-* Uten kildekode: `pdoc3 --html --config show_source_code=False --output-dir .\docs\ .\soitool\main.py`
\ No newline at end of file
+* Uten kildekode: `pdoc3 --html --config show_source_code=False --output-dir .\docs\ .\soitool\main.py`
+
+## Om `Dockerfile`
+
+Docker image som brukes i `.gitlab-ci.yml` er bygget med filen `Dockerfile` og er lastet opp som `morkolai/soitool-ci`. Docker image inneholder alle avhengigheter til prosjektet. Følgende prosedyre brukes for å oppdatere image. Dette må gjøres når `requirements.txt` endrer seg.
+
+* `docker build -t morkolai/soitool-ci .`
+* `docker login`
+* `docker push morkolai/soitool-ci`
diff --git a/requirements.txt b/requirements.txt
index e7003db1ed313fd7ea05e86259946a579bafc7f9..d03bfa2b9ac07a7937dbff9a06c5daf84ea114f9 100644
GIT binary patch
delta 238
zcmZ3+HH~M2lVlP@B10ZS3PUDC34<*V8ZziHm;tfTMBC2Dbg*y=LlRiZ1So6(#D)yK
z3|tHdIU^KVBe1MHSZ4r3CD7OmhJ2tEAj6HJCRl7dD9I?8#83nlH3f=-%r@D4nei{9
zC`eNzgCm14gAZKVc=BoHe)C+0T%c<UP>g~&rWj~VDnl6%rvNQ00@5(Q7&916_Gh^c
E0C=w{+5i9m

delta 27
jcmbQnvy5wk)5L_9%}$IWjGObAzA;X&W9gdg#d-z+izo^V

-- 
GitLab