From 739e8d34483d405964372d9acd2cc4b3f4f16f03 Mon Sep 17 00:00:00 2001 From: ashutosh chaudhary <216.ashutosh@gmail.com> Date: Thu, 14 Feb 2019 19:26:59 +0530 Subject: [PATCH] Fixed docker command permission denied error while building (#1822) --- jenkins/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jenkins/Dockerfile b/jenkins/Dockerfile index cb12f4b..df66c42 100644 --- a/jenkins/Dockerfile +++ b/jenkins/Dockerfile @@ -108,3 +108,7 @@ COPY install-plugins.sh /usr/local/bin/install-plugins.sh #RUN chmod 644 /var/jenkins_home/.ssh/id_rsa.pub ## ssh-keyscan -H github.com >> ~/.ssh/known_hosts ## ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts + +# Fix docker permission denied error +USER root +RUN usermod -aG docker jenkins