AS LOCALto the command.
earthly +build, we'll see a
builddirectory show up locally with a
go-examplefile inside of it.
earthly +dockerwill save an image named
go-examplewith the tag
COPY, outputs will not be produced. Take this Earthfile for example.
earthly +dockerwill not produce any output. In other words, you will not have a
build/go-examplewritten locally, but running
earthly +buildwill still produce output as expected.
BUILDcommand. If you want to use
FROMand still have Earthly create
build/go-examplelocally, you'll need to use the
BUILDcommand to do so.
earthly +dockerin this case will now output
SAVE IMAGEis not enough, we'll also need to invoke push when we call earthly.
earthly --push +docker.
--pushas part of a
RUNcommand to define commands that have an effect external to the build. These kinds of effects are only allowed to take place if the entire build succeeds.
--pushwill only produce output if called directly,
earthly --push +target-with-pushor via a
BUILDcommand. Calling a target via
COPYwill not invoke