
I wanted to try to set up a multi-language monorepo using bazel for experimentation purposes. You can follow the journey on YouTube.
brew install bazelisk on mac) - bazel launcher that also manages the bazel installation & version using the .bazelversion file.bazel run -- @pnpm//:pnpm i --dir $PWDbazel build //...bazel test //...go.modbazel run //:gazelle-update-reposbazel run //:gazellebazel run //projects/python_webbazel run //projects/go_webbazel run //projects/node_webbazel run //projects/ts_app➜ bazel run projects/node_web:oci_tarball
...
Loaded image: projects/node_web:oci_tarball
...
➜ docker run -p 8080:8080 projects/node_web:oci_tarball
...
listening on port 8080
➜ bazel run projects/go_web:oci_tarball_amd64
...
Loaded image: projects/go_web:oci_tarball_amd64
➜
➜ docker run projects/go_web:oci_tarball_amd64
2023/08/27 13:40:22 running program's operating system target: linux
2023/08/27 13:40:22 running program's architecture target: amd64
2023/08/27 13:40:22 Going to listen on port: 8080
➜ bazel run projects/go_web:oci_tarball_arm64
...
Loaded image: projects/go_web:oci_tarball_arm64
➜
➜ docker run projects/go_web:oci_tarball_arm64
2023/08/27 13:40:58 running program's operating system target: linux
2023/08/27 13:40:58 running program's architecture target: arm64
2023/08/27 13:40:58 Going to listen on port: 8080
➜ bazel run projects/go_web:bazoku-deployment --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
...
➜ bazel run examples/multi_arch_go:publish
...
2023/08/18 16:41:38 registry.hub.docker.com/krisfoster96/monorepo-go-web:6: digest: sha256:c50ffe127f340301993cbc323e510211d6dab9a547aa1b1a81035426e4e9d1b1 size: 648
➜ docker buildx imagetools inspect registry.hub.docker.com/krisfoster96/monorepo-go-web:6
Name: registry.hub.docker.com/krisfoster96/monorepo-go-web:6
MediaType: application/vnd.oci.image.index.v1+json
Digest: sha256:c50ffe127f340301993cbc323e510211d6dab9a547aa1b1a81035426e4e9d1b1
Manifests:
Name: registry.hub.docker.com/krisfoster96/monorepo-go-web:6@sha256:18b8c8a2606c3daf70a86db275c850080353bf5bd79a7045cca6732736b693c3
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/arm64
Name: registry.hub.docker.com/krisfoster96/monorepo-go-web:6@sha256:fbc6e9ca088bbb683c0743b16aa98b51583e7af8564febd26154e638b12b484a
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/amd64
➜ docker run --platform linux/arm64 registry.hub.docker.com/krisfoster96/monorepo-go-web:6
...
2023/08/18 15:56:08 running program's operating system target: linux
2023/08/18 15:56:08 running program's architecture target: arm64
2023/08/18 15:56:08 Going to listen on port: 8080
➜ docker run --platform linux/amd64 registry.hub.docker.com/krisfoster96/monorepo-go-web:6
...
2023/08/18 15:56:08 running program's operating system target: linux
2023/08/18 15:56:08 running program's architecture target: amd64
2023/08/18 15:56:08 Going to listen on port: 8080
64 commits
Starlark
80.7%
Go
5.5%
Java
4.2%
Python
3.9%
JavaScript
3.9%
TypeScript
1.5%

I wanted to try to set up a multi-language monorepo using bazel for experimentation purposes. You can follow the journey on YouTube.
brew install bazelisk on mac) - bazel launcher that also manages the bazel installation & version using the .bazelversion file.bazel run -- @pnpm//:pnpm i --dir $PWDbazel build //...bazel test //...go.modbazel run //:gazelle-update-reposbazel run //:gazellebazel run //projects/python_webbazel run //projects/go_webbazel run //projects/node_webbazel run //projects/ts_app➜ bazel run projects/node_web:oci_tarball
...
Loaded image: projects/node_web:oci_tarball
...
➜ docker run -p 8080:8080 projects/node_web:oci_tarball
...
listening on port 8080
➜ bazel run projects/go_web:oci_tarball_amd64
...
Loaded image: projects/go_web:oci_tarball_amd64
➜
➜ docker run projects/go_web:oci_tarball_amd64
2023/08/27 13:40:22 running program's operating system target: linux
2023/08/27 13:40:22 running program's architecture target: amd64
2023/08/27 13:40:22 Going to listen on port: 8080
➜ bazel run projects/go_web:oci_tarball_arm64
...
Loaded image: projects/go_web:oci_tarball_arm64
➜
➜ docker run projects/go_web:oci_tarball_arm64
2023/08/27 13:40:58 running program's operating system target: linux
2023/08/27 13:40:58 running program's architecture target: arm64
2023/08/27 13:40:58 Going to listen on port: 8080
➜ bazel run projects/go_web:bazoku-deployment --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
...
➜ bazel run examples/multi_arch_go:publish
...
2023/08/18 16:41:38 registry.hub.docker.com/krisfoster96/monorepo-go-web:6: digest: sha256:c50ffe127f340301993cbc323e510211d6dab9a547aa1b1a81035426e4e9d1b1 size: 648
➜ docker buildx imagetools inspect registry.hub.docker.com/krisfoster96/monorepo-go-web:6
Name: registry.hub.docker.com/krisfoster96/monorepo-go-web:6
MediaType: application/vnd.oci.image.index.v1+json
Digest: sha256:c50ffe127f340301993cbc323e510211d6dab9a547aa1b1a81035426e4e9d1b1
Manifests:
Name: registry.hub.docker.com/krisfoster96/monorepo-go-web:6@sha256:18b8c8a2606c3daf70a86db275c850080353bf5bd79a7045cca6732736b693c3
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/arm64
Name: registry.hub.docker.com/krisfoster96/monorepo-go-web:6@sha256:fbc6e9ca088bbb683c0743b16aa98b51583e7af8564febd26154e638b12b484a
MediaType: application/vnd.oci.image.manifest.v1+json
Platform: linux/amd64
➜ docker run --platform linux/arm64 registry.hub.docker.com/krisfoster96/monorepo-go-web:6
...
2023/08/18 15:56:08 running program's operating system target: linux
2023/08/18 15:56:08 running program's architecture target: arm64
2023/08/18 15:56:08 Going to listen on port: 8080
➜ docker run --platform linux/amd64 registry.hub.docker.com/krisfoster96/monorepo-go-web:6
...
2023/08/18 15:56:08 running program's operating system target: linux
2023/08/18 15:56:08 running program's architecture target: amd64
2023/08/18 15:56:08 Going to listen on port: 8080
64 commits
Starlark
80.7%
Go
5.5%
Java
4.2%
Python
3.9%
JavaScript
3.9%
TypeScript
1.5%