Build systems for building Docker images and Linux packages

Hi there,

I have a hierarchy of Docker images, which are eventually wrapped into Debian and/or RPM packages. There are dependencies between the Linux package wrappers and the images, as well as between “higher” images and base images (on different layers). The obvious goal now is to rebuild dependent parts of this hierarchy, if somewhere something changes. E.g. the upper-most images, as well as the Linux packages need to be rebuild, if something changes in the application contained in the Docker images. Likewise everything needs to be rebuilt. if the base-image needs to be updated.

I have created a build-system based on CMake (using ADD_CUSTOM_COMMAND, ADD_CUSTOM_TARGET), which works to some degree, but quite honestly is a PITA …

Hence my question, whether anyone in this forum may recommend another (Linux-based) build-system, which is fit for this purpose. The only precondition is that it should be Open Source.

Kind Regards,

Personally, for this usecase, I’m a big fan of jenkins.

I can have a job in jenkins that builds and pushes my ‘base’ image. I can set up triggers on builds that depend on my base image to be queued when the ‘base’ job completes successfully.

Would something like that fit the bill?

If I’m wanting something local instead of a CI system, I end up using a Makefile. I agree that it can be a bit of a pain, but it works for smaller projects that don’t have builds that take too long.

Thanks. I have found that Maven does have plugins for the building of Docker images as well as for the creation of RPM/Debian-Packages. Has anyone used this and can report on his/her experiences ?

There also seem to be Gradle-Plugins for the same purpose. But given that I have never used Gradle, I’d be reluctant to go into this direction.

I agree with @programmerq in that using a CI system as a way of coordinating all the build triggers makes sense. Instead of Jenkins we are currently using drone. We wanted to adopt something with first class support for Docker, and the fact that it is written in go and also supports node.js plugins is frosting on the cake.

I’ve had great success just calling the appropriate docker build command from my jenkins jobs.