How to create a httpd container in docker through jenkins job?

Viewed 33

I need help in creating the container through Jenkins job.

Let me know the steps to be followed: I have already created 3 jobs in Jenkins, and I want to create httpd container through the jobs created.

Should I install any plugins or write any script ?

1 Answers

Assuling we are not talking about Jenkins in docker, or Jenkins agents in Docker, you need to create your http container manually first, without Jenkins.

That means:

  • validate your SSH access to the remote server
  • Check it has Docker installed
  • execute docker commands to run an http container, s described in Docker httpd

Once that is working, you can replicate the process in a Jenkins Job, provided your remote server (the one with Docker, where you want to run your httpd container) is declared as agent to the main Jenkins controller.

Related