3manuek - [Earthly feature]: Disabling Earthly internal labels

submited by
Style Pass
2024-07-05 11:30:04

Even tho these labels are important in terms of information, certain use-cases require including this information (or not) in its own label domain. Labels impact on the build reproducibility, cause it changes the produced hashes of the images, leading to potentially duplicated images.

If you build an image that contains exactly the same binaries, but your Earthly version changes (even if you still have unchanged VERSION in the Earthfiles), this changes the checksum. There are image registry implementations that can handle this with a different mechanism, by avoiding to push duplicated hashes.

By stripping out the labels, we can have full control through our custom domain labels, and avoid duplicated artifacts to be pushed upstream.

From Earthly v0.8.10, the --allow-without-earthly-labels feature flag has been added. This has not been yet updated in the Earthly documentation, but I’m pretty sure it will be soon (and I’ll update this post accordingly).

This is a post in the Earthly series. Other posts in this series:July 1, 2024 - [Earthly feature]: Disabling Earthly internal labels

Leave a Comment