From d22d703d8058935eeaea44dd5e80a8bfb1bf1f8b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 17 Jul 2015 14:42:33 +0200 Subject: [PATCH] Allow jenkins to sudo --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7225aec..79cd8eb 100644 --- a/Dockerfile +++ b/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 \ - 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" && \ - apt-get update && apt-get install -y lxc-docker && \ - rm /etc/apt/sources.list.d/docker.list +RUN 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" \ + && apt-get update && apt-get install -y lxc-docker \ + && apt-get install -y sudo \ + && rm /etc/apt/sources.list.d/docker.list \ + && echo "jenkins ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers USER jenkins