From 5c806636b37ca32a310cb27f687ce89564cf20d8 Mon Sep 17 00:00:00 2001
From: Giorgos Korfiatis <gkorf@grnet.gr>
Date: Fri, 11 Sep 2015 13:19:33 +0300
Subject: [PATCH] Simplify and update docker file

---
 Dockerfile | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 7f986cb..de12f5a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,18 @@
 FROM debian
-RUN apt-get update && apt-get install -y python-pip python-dev git wget vim
-RUN mkdir /src && cd /src && git clone https://github.com/pyinstaller/pyinstaller.git
-ADD . /src/agkyra
+RUN apt-get update && apt-get install -y python-pip python-dev git
 RUN apt-get install -y locales && echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && locale-gen
+RUN adduser --disabled-password --gecos "" user
 ENV LANG en_US.UTF-8
-RUN cd /src/agkyra && ./configure.sh linux64 && python setup.py install
-RUN adduser --disabled-password --gecos "" --ingroup root user
-RUN chmod -R g+w /src
-RUN su -c "cd /src/agkyra && ../pyinstaller/pyinstaller.py agkyra.spec" user
+
+WORKDIR /home/user
+ADD . /home/user/agkyra
+
+RUN git clone https://github.com/pyinstaller/pyinstaller.git
+WORKDIR /home/user/agkyra
+RUN python configure.py linux64 && python setup.py install
+RUN chown user:user /home/user/agkyra/build
+RUN chown user:user /home/user/agkyra/dist
+
+USER user
+ENV HOME /home/user
+RUN ../pyinstaller/pyinstaller.py agkyra.spec
-- 
GitLab