Skip to content

Build containers with AutoDevOps without requiring DinD and privileged runners

With the changes in %11.2, GitLab now supports Kaniko. We should swap out docker build for kaniko in Auto DevOps, so we reduce the need for a privileged runner.

Proposal

Let's try to see if buildah works and what would fail with it. An initial test shows that it can be used as a drop-in replacement for `docker.

Proposal 1

Due to the issues with Kaniko (below), I propose we allow Kaniko as an opt-in when user sets AUTO_DEVOPS_KANIKO.

Proposal 2

Use buildah or img to build container images.

Proposal 3

Use Podman with Buildpacks to build images.

Issues With Kaniko

There are some issues with using kaniko builds that need to be resolved before we can think about trying kaniko again:

Issues with Buildah

Buildah specializes in building OCI images. Buildah's commands replicate all of the commands that are found in a Dockerfile. This allows building images with and without Dockerfiles while not requiring any root privileges. Buildah’s ultimate goal is to provide a lower-level coreutils interface to build images. The flexibility of building images without Dockerfiles allows for the integration of other scripting languages into the build process. Buildah follows a simple fork-exec model and does not run as a daemon but it is based on a comprehensive API in golang, which can be vendored into other tools. (source)

TBD

Edited by Viktor Nagy (GitLab)