Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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.

Can anyone help me point out what else should I check or set?

John

like image 268
John Avatar asked Mar 18 '16 15:03

John


1 Answers

One of the following plugins should work fine:

  • CloudBees Docker Custom Build Environment Plugin
  • CloudBees Docker Pipeline Plugin

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

like image 93
Mark O'Connor Avatar answered Sep 28 '22 10:09

Mark O'Connor