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.
Primarily by disabling debug info.
For example, this slims down the airflow-operator image from 615MiB to 147MiB, and takes the incremental redeploy time from 57s to 29s (on my machine).
This improvement is a combination of the size of the debuginfo itself (~200MiB per binary), and not having to include build dependencies just because our debuginfo refers to them (primarily, this ended up pulling in GCC, which sits at ~260MiB just on its own).
The old behaviour (useful if you want to run it under a debugger.. though we probably want to support that separately somehow) can be restored by adding
--arg debuginfo 2
to thenix-build
call.In addition, this PR adds an option to remove the shell (and associated utililties) from the built images. This can be done by setting
--arg includeShell false
, but is disabled by default because not all operators are compatible yet (in particular: stackabletech/secret-operator#608).