This version promotes a number of features that have been previously in Experimental and Beta status. To make use of the features in this version you need to declare VERSION 0.6
at the top of your Earthfile. If a version is not declared, then Earthly's interpreter will assume VERSION 0.5
.
If you are not ready to update your scripts to take advantage of VERSION 0.6
, then you may upgrade Earthly anyway and your scripts should continue to work as before, provided that they either declare VERSION 0.5
or they don't declare a version at all.
Declaring VERSION 0.6
is equivalent to
VERSION \
--use-copy-include-patterns \
--referenced-save-only \
--for-in \
--require-force-for-unsafe-saves \
--no-implicit-ignore \
0.5
It is recommended to use VERSION 0.6
instead as individual feature flags don't guarantee proper forwards-backwards compatibility. Note, however, that Earthly 0.5.*
is not able to run a VERSION 0.6
Earthfile and will return an error.
For more information on the individual Earthfile feature flags see the Earthfile version-specific features page.
Added
- Earthly now performs local image outputs to the local Docker daemon through a built-in registry. This speeds up the process drastically as common layers no longer need to be transferred over #500.
- Earthly now enables additional parallelism to speed up certain operations that were previously serialized #888. Note that this setting was previously controlled by
--conversion-parallelism
flag or theEARTHLY_CONVERSION_PARALLELISM
environment variable while in experimental stage. It has now been moved as part of the Earthly config and has been promoted to GA. COPY
transfers are sped up as only the necessary files are sent over to BuildKit #1062.WITH DOCKER
has been promoted to GA #576.FROM DOCKERFILE
has been promoted to GA.- Support for Apple Silicon M1 has been promoted to GA #722.
- Multi-platform builds have been promoted to GA #536.
- Mounting secrets as files have been promoted as GA #579.
VERSION
has been promoted to GA #991- User-defined commands (UDCs) have been promoted to GA #581.
- Allow running
SAVE ARTIFACT
afterRUN --push
is now GA #586. SAVE ARTIFACT --if-exists
andCOPY --if-exists
have been promoted to GA #588.- Shared cache and
--ci
mode are now GA #11. LOCALLY
has been promoted to GA #580.RUN --interactive
andRUN --interactive-keep
have been promoted to GA #693.IF
andFOR
have been promoted to GA #779.- If a
SAVE ARTIFACT
is unsafe (writing to a directory outside of the Earthfile directory), it'll require the--force
flag. .earthlyignore
no longer includes any implicit entries likeEarthfile
or.earthlyignore
. These will need to be specified explicitly. #1294- The console output now has an improved structure #1226.
- Fixed homebrew installation on macOS 12. #1370, homebrew/earthly#13
Changed
-
What Earthly outputs locally has changed in a way that is not backwards compatible. For an artifact or an image to be produced locally it needs to be part of a
BUILD
chain (or be part of the target being directly built). Artifacts and images introduced throughFROM
orCOPY
are no longer output locally.To update existing scripts, you may issue a duplicate
BUILD
in addition to aFROM
(or aCOPY
), should you wish for the referenced target to perform output.For example, the following script
FROM +some-target COPY +another-target/my-artifact ./
could become
FROM +some-target BUILD +some-target COPY +another-target/my-artifact ./ BUILD +another-target
in order to produce the same outputs.
For more details see #896.
-
The syntax for passing build args has been changed.
Earthly v0.5 (old way)
FROM --build-arg NAME=john +some-target COPY --build-arg NAME=john +something/my-artifact ./ WITH DOCKER --build-arg NAME=john --load +another-target ... END
Earthly v0.6 (new way)
FROM +some-target --NAME=john COPY (+something/my-artifact --NAME=john) ./ WITH DOCKER --load (+another-target --NAME=john) ... END
Passing build args on the command-line has also changed similarly:
Earthly v0.5 (old way)
earthly --build-arg NAME=john +some-target
Earthly v0.6 (new way)
earthly +some-target --NAME=john
This change is part of the UDC proposal #581. The old way of passing args is deprecated and will be removed in a future version (however, it still works in 0.6).
-
Add builtin args
USERPLATFORM
,USEROS
,USERARCH
, andUSERVARIANT
which represent the platform, OS, architecture, and processor variant of the system Earthly is being called from #1251. Thanks to @akrantz01 for the contribution! -
Support for required ARGs (
ARG --required foo
) #904. Thanks to @camerondurham for the contribution! -
Add a config item for buildkit's
max_parallelism
configuration. Use this to increase parallelism for faster builds or decrease parallelism when resources are constraint. The default is 20. #1308 -
Extend auto-completion to be build-arg aware. Typing
earthly +my-target --<tab><tab>
now prints possible build-args specific to+my-target
. #1330. -
Buildkit was updated to
d429b0b32606b5ea52e6be4a99b69d67b7c722b2
. This includes a number of bug fixes, including eliminating crashes due topanic failed to get edge
.
Fixed
- Eliminated some spurious warnings (
ReadDataPacket failed
,Failed to connect to terminal
,failed to read from stdin
and others) #1241. - Minor fixes related to the experimental Podman support #1239.
- Improved some error messages related to frontend detection #1250.
- Fixed Podman's ability to load OCI images #1287.