From 5cb6f517827fd31cc08e10b41eed1de5228a11f9 Mon Sep 17 00:00:00 2001 From: Alexander Rose Date: Sun, 10 Sep 2017 13:53:03 +0200 Subject: [PATCH 1/3] create user gitlab-runner and set it as default user --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f1f9e45..4851be8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,7 @@ RUN dpkg -i ./gitsemver.deb && rm gitsemver.deb RUN git clone https://gitlab.com/haprotec/haprotec-python-lib.git RUN pip install ./haprotec-python-lib -USER gitlab-runner \ No newline at end of file +RUN useradd -ms /bin/bash gitlab-runner && \ + mkdir -p /workspace && \ + chown gitlab-runner /workspace +USER gitlab-runner From 3fde6625e00e978a98e08c66bc39bb7a1677eebd Mon Sep 17 00:00:00 2001 From: Alexander Rose Date: Sun, 10 Sep 2017 13:58:18 +0200 Subject: [PATCH 2/3] switch workdir to /workspace --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 4851be8..54dbbcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,5 @@ RUN pip install ./haprotec-python-lib RUN useradd -ms /bin/bash gitlab-runner && \ mkdir -p /workspace && \ chown gitlab-runner /workspace +WORKDIR /workspace USER gitlab-runner From 580c86179020f5f716e35133ef117eb4e5befda9 Mon Sep 17 00:00:00 2001 From: Alexander Rose Date: Sun, 10 Sep 2017 14:14:04 +0200 Subject: [PATCH 3/3] change workdir path for gitlab-runner to /builds --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54dbbcc..d4b63b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN git clone https://gitlab.com/haprotec/haprotec-python-lib.git RUN pip install ./haprotec-python-lib RUN useradd -ms /bin/bash gitlab-runner && \ - mkdir -p /workspace && \ - chown gitlab-runner /workspace -WORKDIR /workspace + mkdir -p /builds && \ + chown gitlab-runner /builds +WORKDIR /builds USER gitlab-runner