[build2] Dockerfiles and Docker Images

Markus Pawellek markus.pawellek at mailbox.org
Sat Jan 9 02:11:11 UTC 2021


Boris Kolpackov <boris at codesynthesis.com> wrote:

> Just for my understanding, these are meant as a starting point
> for someone wanting to create a container for CI, right? 

Maybe, but not really.
Of course, the images on Docker Hub can be used for typical CI servers.
I tested them with CircleCI out of curiosity.
But the main reason has been that someone might want to ship an application as Docker image to be able to directly execute it without thinking of configuration and dependencies.
And there seem to be quite a few server environments out there that base their services on Docker containers due to scalability and robustness.
Hence, a C++ application developed for such an environment, like a CGI script for example, should, in my opinion, also be compiled inside a Docker container by using appropriate Dockerfiles with multistage builds.
This will make sure that the target executable is compatible and runs correctly inside the Docker container.

Furthermore, a lot of tools provide Docker images on Docker Hub.
I thought that providing its own Dockerfile and Docker image would give build2 another boost to its awareness.
Based on this, it might has been an act out of base motives.

> If that's correct, then I am wondering why you've decided to setup
> your own CI instead of using ci.cppget.org (not that there is
> anything wrong with that). I am guessing this is due to some
> limitations of our CI service (and can probably guess what the
> are) but I would like to know your opinion/motivation.

At first, I really do like using ci.cppget.org because it is fast, very easy to use, and provides such a large amount of configurations.
Therefore the following points are not really significant to me.

For certain projects, it may not be suitable to use a push model.

For me specifically, sometimes I am using external libraries that are not provided by the build2 package archive but instead can easily be installed by the system's package manager.
I am not aware of a method that allows me to install system dependencies on ci.cppget.org but I know about the stub package idea for future releases (this may be a stronger argument to use these Docker images for CI).

I would like to do code coverage and send reports to a hosting platform, such as Codecov.
For this, I am forced to use another CI server which allows me to generate the reports and send them via a shell command.
This is not a mandatory feature for ci.cppget.org, I think.
But therefore I have to be able to compile build2 packages on other CI platforms.
I have not taken a look into documentation generation but it might be a similar situation.

Furthermore, even if it is negligible, I would like to link the last CI results consistently to the README file in form of a badge or something similar.
But this is only a matter of taste.



More information about the users mailing list