Skip to content

ci/cd: making the api compile 120x faster (and build WAAYYYY smaller images) - #68

Merged
kickhead13 merged 8 commits into
mainfrom
docker-build-time
Jun 11, 2026
Merged

ci/cd: making the api compile 120x faster (and build WAAYYYY smaller images)#68
kickhead13 merged 8 commits into
mainfrom
docker-build-time

Conversation

@kickhead13

@kickhead13 kickhead13 commented Mar 30, 2026

Copy link
Copy Markdown
Member

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!!

Ana Alexandru-Gabriel 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.
@kickhead13 kickhead13 changed the title ci/cd: Improving build times for Docker image ci/cd: making the api compile 120x faster Mar 30, 2026
Comment thread Dockerfile

@OllieOlafsson OllieOlafsson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. nice addition of the COPY --link flag

@AlexDuna AlexDuna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright.

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...
@kickhead13 kickhead13 changed the title ci/cd: making the api compile 120x faster ci/cd: making the api compile 120x faster (and build WAAYYYY smaller images) Apr 5, 2026
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`
@kickhead13
kickhead13 merged commit d437db0 into main Jun 11, 2026
5 checks passed
@catyuzu23

Copy link
Copy Markdown
Member

Critical contribution kutgw <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants