Skip to content

Commit

Permalink
Merge pull request #557 from dbowerman/docker_sudo
Browse files Browse the repository at this point in the history
Add sudo to Docker development image.
  • Loading branch information
julianoes authored Sep 24, 2018
2 parents 5113765 + f2fb6d1 commit 4465537
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile-Fedora-27
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN dnf -y install \
which \
zlib-devel \
golang \
sudo \
&& dnf clean all

RUN wget http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-linux-gnu-Fedora27.tar.xz \
Expand All @@ -41,6 +42,9 @@ RUN gem install --no-ri --no-rdoc fpm;

RUN useradd -d /home/dronecode -m -s /bin/bash dronecode

ADD /sudoers.txt /etc/sudoers
RUN chmod 440 /etc/sudoers

USER dronecode

CMD ["/bin/bash"]
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile-Fedora-28
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ RUN dnf -y install \
which \
zlib-devel \
golang \
sudo \
&& dnf clean all

RUN gem install --no-ri --no-rdoc fpm;

RUN useradd -d /home/dronecode -m -s /bin/bash dronecode

ADD /sudoers.txt /etc/sudoers
RUN chmod 440 /etc/sudoers

USER dronecode

CMD ["/bin/bash"]
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile-Ubuntu-16.04
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN apt-get update \
wget \
libz-dev \
golang-go \
sudo \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
Expand All @@ -47,6 +48,9 @@ RUN gem install --no-ri --no-rdoc fpm;

RUN useradd -d /home/dronecode -m -s /bin/bash dronecode

ADD /sudoers.txt /etc/sudoers
RUN chmod 440 /etc/sudoers

USER dronecode

CMD ["/bin/bash"]
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile-Ubuntu-18.04
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN apt-get update \
ruby-dev \
libz-dev \
golang-go \
sudo \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
Expand All @@ -42,6 +43,9 @@ RUN gem install --no-ri --no-rdoc fpm;

RUN useradd -d /home/dronecode -m -s /bin/bash dronecode

ADD /sudoers.txt /etc/sudoers
RUN chmod 440 /etc/sudoers

USER dronecode

CMD ["/bin/bash"]
Expand Down
2 changes: 2 additions & 0 deletions docker/sudoers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
root ALL=(ALL) ALL
dronecode ALL=(ALL) NOPASSWD: ALL

0 comments on commit 4465537

Please sign in to comment.