How to run docker commands from jenkins pipeline, permission error

342 views
Skip to first unread message

Muhammad Asif

unread,
Dec 29, 2017, 7:05:05 AM12/29/17
to Jenkins Users
I have a jenkins pipeline which need to download and create docker image on the same machine where jenkins is installed. but I am facing the following error.

+ docker pull maven:3-alpine
Warning: failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.32/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.32/images/create?fromImage=maven&tag=3-alpine: dial unix /var/run/docker.sock: connect: permission denied

Adrien Lecharpentier

unread,
Dec 29, 2017, 8:01:14 AM12/29/17
to jenkins...@googlegroups.com

Is your jenkins user part of the docker group?
-- Adrien


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/34bde1d6-23d5-4def-ab59-cd8075d4691d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages