Cross compile gRPC for ARM with Docker.
Install the following tools:
Create a builder:
docker buildx create --name my-builder --driver docker-container --use
Then inspect and bootstrap it:
docker buildx inspect --bootstrap
To compile the binaries:
docker buildx build -f Dockerfile -o type=local,dest=./bin .
P.S. To bust the cache, use --no-cache
.
To make things easier, you can use the bake command.
To compile the binaries:
docker buildx bake