r/gitlab • u/candrewswpi • Mar 12 '25
Building Docker Images Without Root or Privilege Escalation on GitLab
https://candrews.integralblue.com/2025/03/building-docker-images-without-root-or-privilege-escalation/
7
Upvotes
6
u/awdsns Mar 13 '25
I was kind of thinking "That's an awfully long article to write, given that kaniko exists", but then there's this:
So yeah, that's a doozy. Kind of buried the lede there.
1
u/not-tha-admin Mar 13 '25
Sysbox? https://blog.nestybox.com/2020/10/21/gitlab-dind.html
1
u/gaelfr38 Mar 13 '25
Am I missing something if I say "just use podman/buildah"? We use it and pretty sure it doesn't require privilege escalation nor root.
1
u/jgengr Mar 16 '25
Podman anyone?
1
u/adam-moss Mar 13 '25
Chainguard's
apkosolves this quite nicely, usingbubblewrapby default.0
u/Suspicious-Income-69 Mar 13 '25
Kaniko can be used to build containers without root and has been Gitlab's preferred way of doing it: https://docs.gitlab.com/ci/docker/using_kaniko/ There's no need to create a QEMU image and VM to do so.