Docs: Cleanup kaniko / buildah tutorials for (rootless) Docker builds in GitLab CI/CD
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
-
Start this issue's title with Docs:
orDocs feedback:
.
Problem to solve
Our documentation contains outdated information on how to best build Docker images in CI/CD.
Further details
We currently have these two pages in our documentation:
- Use kaniko to build Docker images
- Tutorial: Use Buildah in a rootless container with GitLab Runner Operator on OpenShift
We also recommend kaniko and buildah here, alongside a simpler buildah example. The Buildah tutorial page is very specific, a more generic page might be more helpful – or is the simple example already all that someone who isn't using GitLab Operator would need?
Kaniko appears to be no longer maintained (see also).
Proposal
- Remove the Kaniko page, don't recommnd Kaniko anymore
- Replace it with updated tutorials for current alternatives:
- buildah
- buildkit (see https://joaomedeiros.dev/posts/buildkit-ci/ for example)
- cloud native buildpacks
Who can address the issue
I'll assign the issue to grouppipeline execution like both existing turorials are, but ultimately no product team really owns this topic. It's using third-party things in GitLab CI/CD, which is also technically out of scope for GitLab Support. That said, these tasks are so common that it's in our own best interest to have guidance available.
Ideally someone in support might be able to pick this up and write something up.
Other links/references
There's a bunch of related issues that we could take care of by addressing this:
- Docker-in-Docker vs Kaniko as recommended metho... (#13500)
- Docs feedback: GitLab Kaniko Instructions Don't... (#349945)
- Build & Push docker image using kaniko (#462543 - closed)
These are mentioning kaniko as well, but would probably remain relevant after removing kaniko from the docs:
- Convert Kaniko template to CI component (#435770)
- Allow kaniko caching in separate image repository (#457057)
Make container building first class (#23141) is related as well – I doubt this is something we'll plan to prioritize anytime soon, so having updated documentation on the currently most commonly used approaches would be beneficial to close the gap.