COPY
operation will use the directory where the calling Earthfile exists, as the source.COMMAND
. For example:DO
MY_COPY
does not contain a FROM
so the build environment it operates in is the build environment of the caller.+MY_COPY
has access to the file ./foo
.+MY_COPY
, its effects are seen in the environment of the caller - so the resulting ./bar
is available to the caller.ARG
scope, which is distinct from the caller. Any ARG
that needs to be passed from the caller needs to be passed explicitly via DO +COMMAND --<build-arg-key>=<build-arg-value>
, as in the following example.base
target of the same Earthfile where the command is defined in (this may be distinct from the base
target of the caller).FROM
is specifiedIMPORT
statementsARG
contextARG
s be passed in explicitlyARG
contextSAVE ARTIFACT
, but it's the caller that emits the artifactsSAVE IMAGE
, but it's the caller that emits the imagesearthly
CLIIMPORT
(IMPORT github.com/my-co/my-proj/some-import
)FROM some-import+my-target
DO some-import+MY_UDC
FROM
, BUILD
, COPY
, WITH DOCKER --load
, FROM DOCKERFILE
DO