Looking into how to do a docker-bake build in dagger with Gitlab CI, or locally.
I was able to get this working by having the Gitlab runner mount /var/run/docker.sock and passing the socket into a dagger module build function. Unfortunately using that socket is not very scalable.
I'd prefer to get this working with a docker-in-docker service and using tcp://docker:2376 for the connection but when running the build it can't connect to that address due to 'no such host'
I'm wondering if there is a way to get this to work with a docker-in-docker service?
If not is using something like BuildKit the recommended approach instead or is there a better way to be doing this? I'd like the Gitlab CI to be able to run docker builds from bake files in a scalable way. I don't currently have a kubernetes cluster set up, our runners are just docker.
Suggestions appreciated!