0

I have a CICD pipeline implemented using Gitlab CICD.

I am currently using Kaniko to build my services (mostly python) as a docker image.

I have been wondering if is it necessary to build a new docker image using Kaniko or Docker-dind images. For dockerizing step, I use Docker executor and pulling Docker-dind takes lots of time. Also Kaniko takes up a lot of time creating/retrieving cached-layer. I thought this process could be faster if I use celery executor or shell executor to build image.

What kind of problems would exists if I rely on runner's host system to build the docker images?

I am currently using Kaniko for docker build.

Saewon Kye
  • 13
  • 3
  • 1
    This may be more of an opinion question. Building a docker image inside a docker container has the same benefits as running your app / developing in a container. You only need to figure out your dependencies once, then you can run the build process on any infrastructure that supports Docker. It generally isolates you from the host OS, you can pick whatever linux flavor you want for the build container, and whatever dependencies you need are declarative. Without that you have to figure out how to do it all on the host OS. That said it's not a requirement to build Docker inside Docker. – Andy Ray Jun 26 '23 at 01:59

0 Answers0