[Docker] Multiple Jobs running in the same container instance

25 views
Skip to first unread message

Florian Lier

unread,
Dec 6, 2016, 8:43:21 AM12/6/16
to Jenkins Users
Dear all,

there are some great Docker plugins for Jenkins out there. However, I couldn't find one
that actually solves the following problem:

Let's assume we have a software system consisting of multiple components, e.g,
written in C++, that are _dependent_ on each other.

D is dependent on C, C on B, B on A.  Furthermore, they all have operating system 
dependencies like Ubuntu packages (that might also change when updated upstream).

Now, you'd like to build ABC and D inside a _fresh_ docker container (job orchestration is solved
by defining an up- and downstream chain). In order to do that, you (Jenkins) would spin up new container 
based-on Ubuntu 14.04 for instance install the required packages and then build A,B,C and D 
inside that(!) container instance. After all jobs have been run, the container is shutdown. 

How can one achieve that? All Docker Plugins either start (and stop) a container _per_ job, which 
makes it impossible build all components since they are dependent on each other, or you connect
to a running container (e.g. via SSH). The latter is also not feasible since after the first build the  
environment is not clean anymore (remember I want to start in a fresh Ubuntu).

Any suggestions? Thanks!

Cheers,
   Florian


Baptiste Mathus

unread,
Dec 16, 2016, 3:27:20 PM12/16/16
to jenkins...@googlegroups.com
Hello,

Seems like a possible possible use case for Pipeline and the Docker build step plugin.

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3297781-3690-4804-817e-128ac52df118%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages