mirror of
https://github.com/luzifer-docker/jenkins.git
synced 2024-11-14 03:12:42 +00:00
Allow jenkins to sudo
This commit is contained in:
parent
c933fe3423
commit
d22d703d80
1 changed files with 6 additions and 5 deletions
11
Dockerfile
11
Dockerfile
|
@ -3,10 +3,11 @@ USER root
|
||||||
|
|
||||||
RUN bash -c "if ! [ -e /usr/lib/apt/methods/https ]; then apt-get update && apt-get install -y apt-transport-https; fi"
|
RUN bash -c "if ! [ -e /usr/lib/apt/methods/https ]; then apt-get update && apt-get install -y apt-transport-https; fi"
|
||||||
|
|
||||||
RUN \
|
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 \
|
||||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 && \
|
&& sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" \
|
||||||
sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" && \
|
&& apt-get update && apt-get install -y lxc-docker \
|
||||||
apt-get update && apt-get install -y lxc-docker && \
|
&& apt-get install -y sudo \
|
||||||
rm /etc/apt/sources.list.d/docker.list
|
&& rm /etc/apt/sources.list.d/docker.list \
|
||||||
|
&& echo "jenkins ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
|
||||||
USER jenkins
|
USER jenkins
|
||||||
|
|
Loading…
Reference in a new issue