Explore Courses Blog Tutorials Interview Questions
+1 vote
in DevOps and Agile by (29.3k points)

I would like to run Docker shell commands on Jenkins like:

docker ps

Is it possible to do it without using any plugins? Since Jenkins isn't a user, but a service account how can I add to the docker group?

1 Answer

0 votes
by (50.2k points)

First execute

sudo groupadd docker

Then execute

sudo usermod -aG docker $USER

Then log out its important to logout because your group membership is re-evaluated

Login and try again

docker ps

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers


108k users

Browse Categories