3 ms·
I currently use Bazel in combination with rules_docker to construct container images of applications, often written in Go. As I don't depend on cgo, my containe
by EdSchouten 8y ago
I currently use Bazel in combination with rules_docker to construct container images of applications, often written in Go. As I don't depend on cgo, my container images may be bare (i.e., only containing a Go executable and some static artifacts).
Though I understand that there are likely only dozens of us, my question is: what would the use of Buildpacks buy us for this specific use case?
- justinsaccount 8y agoone case is that you could have a bazel buildpack that contains bazel and java and all that stuff requires in order to run the build. Unfortunately the resulting image would be larger than just a single binary, but building it would be a lot easier and repeatable for other people working on the project. The base layers would be cached though so in practice it might not be that much larger on disk. I looked into using bazel for doing similar things, and the biggest stumbling block is that bazel itself is a PITA to install on all platforms. May end up trying https://please.build/ https://please.build/ at some point.
- jbott 8y agoThe bazel installation process has gotten a lot better lately - they now bundle OpenJDK inside the binary and it is only a single download.
- justinsaccount 8y agoUnfortunately that's a non starter for things like debian.. but that's good to know, I'll give it another look. One thing I really like about bazel is the pkg rules.. I currently use fpm/goreleaser(nfpm) to build rpms for things, and it's nice having a single build tool that can build the app and spit out an rpm.
- jacques_chester 8y agoMostly the advantage would be that 1) you wouldn't have to maintain the buildpack yourself, 2) operators can upgrade your software without needing to get you to do it, 3) upgrades might actually be faster due to layer rebasing and 4) if you add other stacks to your architecture, you still have the same development, deployment and update experience.