Skip to content

Commit

Permalink
Add sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mokolea committed May 29, 2019
1 parent 868c561 commit 6a73c48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM haskell

LABEL version="1.1.1"
LABEL version="1.2.0"
LABEL maintainer="Mario Ban <[email protected]>"

# Install additional packages
Expand All @@ -27,6 +27,7 @@ RUN apt-get update -y && \
joe \
vim \
less \
sudo \
procps && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Expand All @@ -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
Expand Down

0 comments on commit 6a73c48

Please sign in to comment.