Make Jenkins run docker without sudo -


i run docker shell commands on jenkins like:

docker ps

is possible out using plugins? since jenkins isn't user, a service account how can add docker group?

following approach worked me run docker commands without plugins

rather adding jenkins user docker group, allowed jenkins user run sudo commands out prompting password , created alias avoid sudo in dockerfile jenkins slave. had install docker client in container connects daemon running in host machine.

  ## allowing jenkins user run sudo commands run echo "jenkins all=(all) nopasswd: all" >> /etc/sudoers  ## avoid typing sudo in command line run echo "alias docker='sudo docker '" >> /home/jenkins/.bashrc 


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -