-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
There are many many many different ways of packaging rust applications into docker to make a nice workflow. Many of them have tons of annoying cache-caveats (some that only work on CI, some that only work locally).
I would like to have a good guide with some pros/cons discussions on deployment choices and that optimise for a few different metrics (parenthesised):
- standardised rust image (readability)
- standardised rust image as managed by CI providers like circleci (CI image locality)
- above but with cargo-chef (CI cache time)
- musl cross compilation (docker image size, less direct C dependencies)
- arm cross compilation (cloud compute costs via graviton)
Most of these have some annoying side effects:
- rust image -> slow iteration time locally and on CI
- CI provided rust image -> faster on CI, but potential differences between local build and CI
- cargo-chef -> large, inscrutable docker images, and still awkward for local builds
- musl cross -> potential musl compat issues and static toolchain upgrade problems (C deps in image)
- arm cross -> ??? need to know more ??? looks very new
Additionally it would be nice to also discuss some stuff that can (probably) be used with most of the above choices:
- docker buildkit caching (e.g. version-rs's Dockerfile) (hard to get right on CI, but perhaps possible now)
- distroless for security benefits
- how to pave over awkward build invocations with tilt / skaffold
- something about benefits of compromising on mono-stack and using different images for linting
With this we can probably close kube-rs/kube#332
h7kanna
Metadata
Metadata
Assignees
Labels
No labels