From 6a73c483433d056790b8a515db83baea437d6855 Mon Sep 17 00:00:00 2001 From: Mario Ban Date: Wed, 29 May 2019 20:13:32 +0200 Subject: [PATCH] Add sudo --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ce9519..706ed5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM haskell -LABEL version="1.1.1" +LABEL version="1.2.0" LABEL maintainer="Mario Ban " # Install additional packages @@ -27,6 +27,7 @@ RUN apt-get update -y && \ joe \ vim \ less \ + sudo \ procps && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -43,7 +44,11 @@ RUN cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime #RUN texhash # Add user and group -RUN groupadd --gid 1000 docker && useradd --uid 1000 --create-home --no-log-init -g docker docker +RUN groupadd --gid 1000 docker && useradd --uid 1000 --create-home --no-log-init -g docker -G sudo docker + +# No password for sudo +RUN echo "docker ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/010_docker-nopasswd +RUN chmod 440 /etc/sudoers.d/010_docker-nopasswd # Set user to use USER docker:docker