Looking for a pre-made recipe template? See: Bazel Buildfarm
Make sure both kubectl and helm are installed.
Install bazel buildfarm on your k8s cluster using the official helm chart:
Forward the port from the k8s cluster to your DevBox:
Create the following bazel workspace file structure for testing:
main.cc
BUILD
WORKSPACE
Leave this file empty.
Run bazel run :main
to verify the build locally.
DOCKER_HOST
Make sure you are connected to the DevZero network:
Set DOCKER_HOST
environment variable on your machine to match the DevBox hostname:
Verify the installation by running:
When you run the docker build
command, the build context will be sent to the DevBox and the build process will run.
If you're seeing "Host key verification failed" error, try connecting to your DevBox via ssh first to verify the fingerprint.
Inside your DevBox, run the BuildKit container:
On your machine, create a new buildx instance:
Build an image using remote driver (and download it locally):
Inside your DevBox, install the Docker Registry:
Make sure your machine is connected to the DevZero network:
Verify you can access the registry from your machine:
Build and push your image to the registry
With Docker:
With BuildKit remote cache (see previous section):
Verify the image is available in the registry:\
If you're getting "http: server gave HTTP response to HTTPS client", try adding the following to your Docker daemon json configuration:
Create a new workspace with Docker installed ().
Create a new workspace with Docker installed ().
See for all available options.
Create a new workspace with Docker installed ().
See for available options.