Builtin args

Builtin args are variables with values automatically filled-in by Earthly.

The value of a builtin arg can never be overridden. However, you can always have an additional ARG, which takes as the default value, the value of the builtin arg. The additional arg can be overridden. Example

ARG EARTHLY_TARGET_TAG
ARG TAG=$EARTHLY_TARGET_TAG
SAVE IMAGE --push some/name:$TAG

Important

In contrast to Dockerfile predefined args, Earthly builtin args need to be pre-declared before they can be used. For example

ARG EARTHLY_TARGET
RUN echo "The current target is $EARTHLY_TARGET"

The following builtin args are available

Note

The classical Dockerfile predefined args are currently not available in Earthly.

Last updated