shelljenkinsdocker

How to run a Docker command in Jenkins Build Execute Shell


I'm new to Jenkins, and I have been searching around, but I couldn't find what I was looking for.

I'd like to know how to run a Docker command in Jenkins (Build - Execute Shell):

Example: docker run hello-world

I have set Docker Installation for "Install latest from docker.io" in Jenkins Configure System and also have installed several Docker plugins. However, it still didn't work.

What else should I check or set?


Solution

  • One of the following plugins should work fine:

    I normally run my builds on slave nodes that have docker pre-installed.