Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
How to create automatic docker image after successful build of Jenkins?

I want to create a automatic docker image through Jenkins once build got success.

I tried by providing docker commands in execute shell but throwing command not found error.If this is not right way how to achieve this in Windows 10.

Shell

Error:

................    
................
  12 passing (81ms)

+ docker build -t snapshot .
C:\WINDOWS\TEMP\jenkins6038297422360146327.sh: line 4: docker: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Even after installing docker inside jenkins it is not picking my docker url

Docker inside jenkins

Docker Inside Jenkins

Complete error of Docker URL

enter image description here

Created a new vm with TLS false:

docker-machine create -d virtualbox --engine-opt tlsverify=false node2

to check TLS is made false i ran below command

 docker-machine env node2

enter image description here

here DOCKER_TLS_VERIFY = "1",however in the documentation it is mentioned DOCKER_TLS_VERIFY = "0" should be zero whether my machine now TLS enabled or not how can i confirm my machine is TLS false??

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

The shell you configured in your Jenkins job is executed by Jenkins executor on Jenkins machine(or Jenkins Slave machine if you're using Jenkins the Master-Slave way), so whatever command you would like to use, it must be installed correctly and in the PATH of the target machine, just like you execute command on terminal manually.

So the error message is self-explained now:

C:\WINDOWS\TEMP\jenkins6038297422360146327.sh: line 4: docker: command not found

which means you have not installed docker on your Jenkins machine, you need to install and configure it firstly.

Additionally, you may want to have a look at Docker build step plugin for Jenkins.

over 4 years ago · Santiago Trujillo Report

0

If you don't need to run Docker on the same server than Jenkins I found that downloading a Docker Client was better than using the Jenkins Plugin. You can find the latest version here: https://download.docker.com/win/static/stable/x86_64/

Then just call the docker command with --host 192.168.99.100. It should work and build the image on the Docker Server 192.168.99.100

over 4 years ago · Santiago Trujillo Report

0

install docker on jenkins. Jenkins does not know about docker.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!