ci/cd: making the api compile 120x faster (and build WAAYYYY smaller images) - #68
Merged
Conversation
added 2 commits
March 30, 2026 16:46
The Dockerfile we were using had (and still has...) some issues. We didn't properly use cargo-chef, since we were copy-ing just too much of the repo's context into the planner/cacher stage making it very easy to invalidate layers... On top of this we would cargo build too many times which was totally unnecesary. The issue that still remains is that of statically linking the app... which I have yet to solve.
Using a much superior method for caching compilation matadata I was able to improve the time it takes to compile the test-env. Now, each time you make a change to the source code you should be able to recompile the test-env in about 1 second.
OllieOlafsson
approved these changes
Mar 31, 2026
OllieOlafsson
left a comment
Member
There was a problem hiding this comment.
LGTM. nice addition of the COPY --link flag
using clux/muslrust we are able to FINALLY fix the size of od-official-server image sizes also fix caching (through chef removal) of base docker image...
so for whatever reason neovim decided to "fix" launch-test-env indentation, please ignore launch-test-env changes of this commit EXCEPT FOR THE `export RUN_LINT='false' part`
Member
|
Critical contribution kutgw <3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Dockerfile we were using had (and still has...) some issues. We didn't properly use cargo-chef,
since we were copy-ing just too much of the
repo's context into the planner/cacher stage making it very easy to invalidate layers...
On top of this we would cargo build too many times which was totally unnecesary.
The issue that still remains is that of statically linking the app... which I have yet to solve.
EDIT: ITS SOLVE HE HAVE 14MB IMAGES!!