-
Notifications
You must be signed in to change notification settings - Fork 333
[skip ci] faster local docker image building using buildah #1349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
47ab321
to
5850b71
Compare
buildah-compile.sh compiles wire-server inside an alpine-based container based on quay.io/wire/alpine-builder. the tool 'buildah' is used to mount some folders in, and to keep the stack caches of .stack and .stack-work (renamed to avoid conflicts) for the next compilation After compilation, ./buildah-make-images.sh can be used to bake individual executables into their respective docker images used by kubernetes. Usage: just run 'make buildah-docker' which will compile and upload images to quay.io under the docker tag $USER by default.
6a054dc
to
24e9617
Compare
Updated description. Ready for review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some FUTUREWORK comments in code. Looks good!
We wanted to move away from I was under the impression that |
Co-authored-by: Akshay Mankar <[email protected]>
d4c1c37
to
860a42b
Compare
Yep, ability to mount folders into a building container was the main reason to try out buildah. |
buildah-compile.sh compiles wire-server inside an alpine-based container based on quay.io/wire/alpine-builder.
the tool 'buildah' is used to mount some folders in, and to
keep the stack caches of .stack and .stack-work (renamed to avoid conflicts) for the next compilation.
After compilation, ./buildah-make-images.sh can be used
to bake individual executables into their respective docker images used by kubernetes.
Usage: just run 'make buildah-docker' which will compile and upload
images to quay.io under the docker tag $USER by default.
On my machine, the overhead (from a successful
stack build
of wire-server to a set of ~15 docker images locally) is 1.5 minutes. Pushing to quay.io depends on your internet connection. Pushing to a local kubernetes cluster would be faster.FUTUREWORK: build only some, not all images. (good luck figuring out the bash syntax to pass space-separated executables as arguments...)
FUTUREWORK: provide buildah using nix
FUTUREWORK: parameterize having or not
--fast
and maybe also use this on CIFUTUREWORK: remove some docker makefile targets that are somewhat outdated