buildkit_host in configuration file is ignored
Author: mxeyCreated May 24, 2023Updated May 13, 2025
Labelstype:bug
Apparently since v0.7.5 Earthly ignores the buildkit_host setting in its configuration file. Only the environment variable EARTHLY_BUILDKIT_HOST has an effect.
The following was done with v0.7.6 because it made the error obvious. We already had the connection issue with v0.7.5 though, so I assume only the error message changed. The output is from a Gitlab CI job.
$ earthly --version
earthly version v0.7.6 78d2f5be89c8ada1048ed7130ed319948bf79912 linux/amd64; Alpine Linux
$ cat ${EARTHLY_CONFIG}
global:
# 172.17.0.1 ist der Host im Docker-Standard-CIDR
buildkit_host: "tcp://172.17.0.1:8372"
tls_enabled: true
tlsca: "/etc/earthly/cert.pem"
tlscert: "/etc/earthly/cert.pem"
tlskey: "/etc/earthly/key.pem"
git:
gitlab.rz.babiel.com:
auth: https
user: gitlab-ci-token
password: [MASKED]
$ earthly +test
loading config values from "/tmp/earthly.conf.yaml"
frontend | No frontend initialized. Use --verbose to see details
Init
————————————————————————————————————————————————————————————————————————————————
buildkitd | Connecting to ...
Share your logs with an Earthly account (experimental)! Register for one at https://ci.earthly.dev/.
Error: build new buildkitd client: connect provided buildkit: timeout 1m0s: could not connect to buildkit: failed to list workers: Unavailable: connection error: desc = "transport: Error while dialing: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory": buildkitd did not respond (in time)If I set EARTHLY_BUILDKIT_HOST to tcp://172.17.0.1:8372, it works. So it seems to me the configuration file setting is ignored and only the environment variable matters.
Source: earthly/earthly