Creating your own Dockerized GitLab Runner

Most people will use prebuilt Docker containers, but there are reasons to build your own. Maybe you have special requirements when building your software that aren't installed in the default Docker images that are available or maybe it's just not possible because of security restrictions. A lot of default images have software included that contain vulnerabilities.

Let's create our own Dockerized GitLab Runner for the project from Chapter 10, Create Your Product, Verify, and Package it, that is, the event manager documentation, using a Dockerfile. You will find our first attempt in the next section.

Let me stress that this Dockerfile is purely for demonstration purposes. We don't recommend building ...

Get Mastering GitLab 12 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.