#GitLab CI | Dagger
1 messages · Page 1 of 1 (latest)
Are you using magic cache in your setup. If you're not this is expected with ephemeral dagger-engine setup.
if you want to utilize local caching with dagger you can look into https://docs.dagger.io/integrations/gitlab#kubernetes-executor section. Basically you need to install dagger on your cluster and pass connection information to dagger using env var in config.toml.
Dagger provides a programmable container engine that allows you to replace your YAML pipeline definitions in GitLab with Dagger Functions written in a regular programming language. This allows you to execute your pipeline the same locally and in GitLab, with the additional benefit of intelligent caching.
Why is the Gitlab approach setup to use DinD?
Probably it is related with gitlabs executors. Not all executors has docker accessible directly. Most of the times you need to connect DinD to your job to able to execute docker commands.
Thanks for the replies. When you say "magic cache" is this caching using Dagger Cloud? At present we're not using Dagger Cloud
So for local caching we'd need to use Kubernetes and not Docker? (I'm not very familiar with Kubernetes at the moment)
are you using your own runners or public runners?
Sorry I should have made that point more clear in my initial question. We are using self-hosted runners on Ubuntu in our corporate network
If your runner already has docker access, you don't need to use DinD setup.
You can try to run dagger-engine on your ubuntu machine as service in the background and pass env variable "_EXPERIMENTAL_DAGGER_RUNNER_HOST=unix:///var/run/dagger/buildkitd.sock" along with host path var/run/dagger
This should allow you to connect your dagger engine using gitlab runners