Configuration reference
Last updated
Was this helpful?
Last updated
Was this helpful?
Global configuration values for earthly can be stored on disk in the configuration file.
By default, earthly reads the configuration file ~/.earthly/config.yml
; however, it can also be overridden with the --config
command flag option.
The earthly config file is a formatted file that looks like:
Example:
Specifies the total size of the BuildKit cache, in MB. The BuildKit daemon uses this setting to configure automatic garbage collection of old cache. Setting this to 0, either explicitly or by omission, will cause buildkit to use its internal default of 10% of the root filesystem.
Specifies the total size of the BuildKit cache, as a percentage (0-100) of the total filesystem size. When used in combination with cache_size_mb
, the lesser of the two values will be used. This limit is ignored when set to 0.
A custom user-supplied program to call which returns a secret for use by earthly. The secret identifier is passed as the first argument to the program.
If no secret is found, the program can instruct earthly to continue searching for secrets under .env
, by exiting with a status code of 2
, all other non-zero status codes will cause earthly to exit.
For example, if you have:
and my-secret-provider
(which is accessible on your PATH
):
Then when earthly encounters a command that requires a secret, such as
earthly will request the secret for mysecret
by calling my-secret_provider mysecret
.
When set to true, disables sharing build logs after each build. This setting applies to logged-in users only.
The number of concurrent converters for speeding up build targets that use blocking commands like IF
, WITH DOCKER --load
, FROM DOCKERFILE
and others.
The maximum parallelism configured for the buildkit daemon workers. The default is 20.
This option allows you to pass additional options to Docker when starting up the Earthly BuildKit daemon. For example, this can be used to bypass user namespacing like so:
This option allows you to pass additional options to BuildKit. For example, this can be used to specify additional CA certificates:
Allows overriding Earthly's automatic MTU detection. This is used when configuring the BuildKit internal CNI network. MTU must be between 64 and 65,536.
Allows overriding Earthly's automatic ip_tables
module detection. Valid choices are iptables-legacy
or iptables-nft
.
This option is obsolete and it is ignored. Earthly no longer uses a loop device for its cache.
This option allows you to specify what supported frontend you are using (Docker / Podman). By default, Earthly will attempt to discover the frontend in this order: Docker -> Podman -> None
For Docker:
For Podman:
You can use the following command to set the configuration option using the earthly CLI:
All git configuration is contained under site-specific options.
The git repository hostname. For example github.com
, or gitlab.com
Either ssh
, https
, or auto
(default). If https
is specified, user and password fields are used to authenticate over HTTPS when pulling from git for the corresponding site. If auto
is specified earthly will use ssh
when the ssh-agent is running and has at least one key loaded, and will fallback to using https
when no ssh-keys are present.
The HTTPS username to use when auth is set to https
. This setting is ignored when auth is ssh
.
The HTTPS password to use when auth is set to https
. This setting is ignored when auth is ssh
.
The strict_host_key_checking
option can be used to control access to ssh-based repos whose key is not known or has changed. Strict host key checking is enabled by default, setting it to false
disables host key checking. This setting is only used when auth is ssh
.
Connect using a non-standard git port, e.g. 2222
.
The prefix
option is used to indicate where git repositories are stored on the server, e.g. /var/git/
.
A regular expression defined to match git URLs, defaults to the <site>/([^/]+)/([^/]+)
. For example if the site is github.com
, then the default pattern will match github.com/<user>/<repo>
.
If specified, a regular expression substitution will be performed to determine which URL is cloned by git. Values like $1
, $2
, ... will be replaced with matched subgroup data. If no substitute is given, a URL will be created based on the requested SSH authentication mode.
To quickly change a configuration item via the earthly
command, you can use .
When set to true, disables collecting command line analytics; otherwise, earthly will report anonymized analytics for invocation of the earthly command. For more information see the .
This option is obsolete and it is ignored. Earthly cache has moved to a Docker volume. For more information see the .
See the for a guide on setting up authentication.
See the for a guide on setting up authentication with self-hosted git repositories.
See the for a complete definition of the supported regular expression syntax.
See the for a guide on setting up authentication with self-hosted git repositories.