add experimental feature to enable zstd for depot builds #4065
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
What and Why:
For most Apps, enabling
zstd
will improve machine create times due to faster image pulls. With Fly's built-in builder, it was never able to make it possible to enablezstd
builds and left the user having to manage the image build process on their own. However, now that we default to depot builders, it's possible to enable the feature with an additional argument, https://depot.dev/blog/building-images-gzip-vs-zstd.How:
To start, we'll allow enabling
zstd
builds to be done with theexperimental
section offly.toml
or as a flag passed tofly machine run
.Related to:
https://community.fly.io/t/try-out-faster-machine-creation-with-zstd/18354
https://community.fly.io/t/why-machines-take-a-lot-of-time-to-be-created-sometimes/22647/2
Documentation