3 ms·
I actually just switched my CI pipelines from Docker to Buildah this week to avoid using an old version of docker-dind and drop permissions on my build containe
by tapoxi 4y ago
I actually just switched my CI pipelines from Docker to Buildah this week to avoid using an old version of docker-dind and drop permissions on my build containers.
It was incredibly easy. The arguments are exactly the same, so it was just a %s/docker/buildah/g
Images from dockerhub also need to have docker.io/ appended to the front, since buildah doesn't assume dockerhub by default. There is apparently an option for aliases to set a default search namespace but it wasn't important enough for me to dive into.
- gorgoiler 4y agoDodging dind is a worthy achievement. Thanks for posting your story. I would love to hear more details.
- tapoxi 4y agoThat's basically all there is to it. I'm using GitLab CI, pulling the official buildah image from quay.io. Everything worked on the second try (after appending docker.io/) for about a dozen "core" container builds. The downstream ones use Google Jib kicked off by a gradle build for our spring apps.
- sofixa 4y agoKaniko is also a good alternative to buildah for building containers inside containers without dind.
- saynay 4y agoKaniko is what I use as well, since I initially had some containers that were not building correctly with buildah. Not quite as seamless as buildah promised to be, but it can read Dockerfiles with no modifications, so it was easy enough to move to.