Excluding patterns
Last updated
Was this helpful?
Last updated
Was this helpful?
When a build takes place, the earthly
command sends any necessary local build contexts to the BuildKit daemon. In order to avoid sending unwanted files, you may exclude certain patterns by specifying an .earthlyignore
file.
The .earthlyignore
file must be present in the same directory as the target being built.
The syntax of the .earthlyignore
file is the same as the syntax of a . Behind the scenes, the matching is performed using the Go function.
Patterns of files to exclude from the build context are specified as one pattern per line, with empty lines or lines starting with #
being ignored. Each pattern has the following syntax: