Run "gradle docker" for spring boot, on Jenkins

(Sean Nguyen) #1

Hi,

When I run “gradle docker” for a spring boot project locally, it works fine, and the image is built.

However, When I ran on “gradle docker” on jenkins, the Error message is:

Caused by: java.io.IOException: Cannot run program “docker” (in directory “/var/lib/jenkins/workspace/maskdemo_pipeline_master/build/docker”): error=2, No such file or directory
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
… 7 more
Caused by: java.io.IOException: error=2, No such file or directory
… 8 more
Anyone have any idea what cause this issue? Thank you

0 Likes

(Sean Nguyen) #2

Solution:

  • install docker on EC2 instance
  • give jenkins permission to run docker
0 Likes