From 4522f30213f5f1952d51ce1d734174902ff5ba37 Mon Sep 17 00:00:00 2001 From: Frank Sauerburger <frank@sauerburger.com> Date: Tue, 8 Aug 2017 10:50:11 +0200 Subject: [PATCH] Use CI image with unprivileged user Use CI image with an unprivileged user student, which has no-password sudo powers, such that the installation snipped from the README.md can be executed directly. --- Dockerfile | 7 ++++--- README.md | 15 ++------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f9fdb3..97d09d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,10 @@ LABEL maintainer "frank@sauerburger.com" # install python3, setuptools and git RUN apt-get update && apt-get install -y \ - python3 python3-setuptools git\ + python3 python3-setuptools git sudo\ && rm -rf /var/lib/apt/lists/* # install doxec -RUN git clone https://srv.sauerburger.com/esel/doxec.git && cd doxec && git checkout b0ce804f && python3 setup.py install -RUN echo "" | adduser --disabled-password student +RUN git clone https://srv.sauerburger.com/esel/doxec.git && cd doxec && git checkout b0ce804f && python3 setup.py install +RUN echo "" | adduser --disabled-password student && echo "student ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +USER student diff --git a/README.md b/README.md index cc194a0..9042607 100644 --- a/README.md +++ b/README.md @@ -22,21 +22,10 @@ analysis and data presentation. To install all the packages on Ubuntu, you can run the following command line. ```bash -sudo apt-get install python3 python3-pip -pip3 install --user numpy scipy matplotlib -``` -<!-- -Doxec in a docker container needs a slightly different command, please keep them -in-sync. ---> -<!-- console -```bash -$ apt-get update -$ apt-get -y install python3 python3-pip -$ su student +$ sudo apt-get update +$ sudo apt-get install -y python3 python3-pip $ pip3 install --user numpy scipy matplotlib ``` ---> # Prerequisites and Structure -- GitLab