Re: Build Docker Image from a Dockerized Jenkins

2017-12-05 Thread Jacob Larsen
On 2017-12-05 09:03, nicolas de loof wrote: 2017-12-04 21:38 GMT+01:00 Jacob Larsen >: Here is a list of the options I know, but one important aspect to this is if you use pipeline or not in your builds as that affects your choices:

Re: Build Docker Image from a Dockerized Jenkins

2017-12-05 Thread nicolas de loof
2017-12-04 21:38 GMT+01:00 Jacob Larsen : > Here is a list of the options I know, but one important aspect to this is > if you use pipeline or not in your builds as that affects your choices: > > Docker Custom Build Environment Plugin. This will use an existing executor > to

Re: Build Docker Image from a Dockerized Jenkins

2017-12-04 Thread Jacob Larsen
Here is a list of the options I know, but one important aspect to this is if you use pipeline or not in your builds as that affects your choices: Docker Custom Build Environment Plugin. This will use an existing executor to launch a container with the build. The images used need not be aware

Re: Build Docker Image from a Dockerized Jenkins

2017-12-04 Thread nicolas de loof
ok, so for this purpose you can rely on docker-plugin to create agents on-demand from configured docker images, or docker-slaves-plugin if you want this configured directly within your jobs, and docker-pipeline "inside" if you prefer Jenkinsfiles to setup CI/CD in jenkins. 2017-12-04 17:37

Re: Build Docker Image from a Dockerized Jenkins

2017-12-04 Thread Jeeva Chelladhurai
I would like to run my builds inside docker, so that I can manage different run times like node, python, go thru docker images. - Jeeva On Mon, Dec 4, 2017 at 5:51 PM, nicolas de loof wrote: > (another) plugin of mines. > Same design as docker-pipeline's

Re: Build Docker Image from a Dockerized Jenkins

2017-12-04 Thread nicolas de loof
(another) plugin of mines. Same design as docker-pipeline's "docker.inside" Can you please describe your use-case so we give better advise ? if you just want to "build Docker images" as your initial message told, then just run "docker build" within your job, what else ? 2017-12-04 13:15

Re: Build Docker Image from a Dockerized Jenkins

2017-12-04 Thread Jeeva Chelladhurai
Any thoughts on https://wiki.jenkins.io/display/JENKINS/CloudBees+Docker+Custom+Build+Environment+Plugin On Mon, Dec 4, 2017 at 12:04 PM, Jeeva Chelladhurai wrote: > > >> I have not tried this, so, cannot vouch for this. Please be cautious >> about the approach presented in

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jeeva Chelladhurai
> > I have not tried this, so, cannot vouch for this. Please be cautious about > the approach presented in this blog. > > http://niels.nu/blog/2017/continuous-blog-delivery-p2.html : you might be > interested in Docker-in-Docker. > > > Thanks for the suggestion.. Docker-in-Docker is been

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Ramanathan Muthaiah
Hi Jeeva, > I would like to build Docker images from a Dockerized Jenkins. There are > multiple solution out there but what is the recommended solution... > > I have been using ssh node as a work around, but I was told to use > https://wiki.jenkins.io/display/JENKINS/Docker+Slaves+Plugin . In

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jeeva Chelladhurai
Hi Nicolas, Thanks for your input. Using Java API is an excellent idea. There is hackathon planned for Jenkins this week https://www.meetup.com/jenkinsBLR/events/240212894/ Perhaps, this requirement could be prioritized at the hackathon if you could give a helping hand.. Thanks, Jeeva On Mon,

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jacob Larsen
I wouldn't use Docker Slaves for this. Just install the docker client in your Jenkins image and bind mount /var/run/docker.sock. Then a simple sh step with docker build + docker push should do the trick. If you don't want to use your jenkins master for this, you could make a slave container

Re: Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread nicolas de loof
There's no "recommended" solution, each plugin comes with it's own vision, benefits and drawbacks. docker-plugin can be used to run dockerized agents, it can run from a dockerized jenkins master with /var/run/docker.sock without docker CLI installed, as it uses a java client library for docker

Build Docker Image from a Dockerized Jenkins

2017-12-03 Thread Jeeva Chelladhurai
Hello All, I would like to build Docker images from a Dockerized Jenkins. There are multiple solution out there but what is the recommended solution... I have been using ssh node as a work around, but I was told to use https://wiki.jenkins.io/display/JENKINS/Docker+Slaves+Plugin . In order for