Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
4 views
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

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...