3 ms·
We use Nix + Bazel. Nix builds the base image with Python and whatever else we want. Bazel layers our actual Python app on top of it. No dockerfiles at all. Ex
by jvolkman 5y ago
We use Nix + Bazel. Nix builds the base image with Python and whatever else we want. Bazel layers our actual Python app on top of it. No dockerfiles at all.
Example: https://github.com/jvolkman/bazel-nix-example https://github.com/jvolkman/bazel-nix-example
- kristjansson 5y agoIt sounds so cool, but then I don’t get out of the base image before you’re writing your own Python launcher in a heredoc in a shell script in a docker image builder in a nix derivation[0]? Curiosity compels me to ask: how did all that become necessary? [0]: https://github.com/jvolkman/bazel-nix-example/blob/e0208355fc8cc891c17c851bcd2c271b355bc58a/python38_base_image.nix#L29 https://github.com/jvolkman/bazel-nix-example/blob/e0208355f...
- jvolkman 5y agoIt mostly grew out of using Nix to fetch a python interpreter for builds and tests. By default, Bazel will use whichever python binary is on the host (if any), which can lead to discrepancies between build hosts and various developer machines.