Remote build with Docker Buildx
Create builder instance on remote machine
Section titled “Create builder instance on remote machine”docker buildx create \ --name MyBuilder \ --driver docker-container \ --platform linux/amd64 \ ssh://user@remote-machine
Use the builder instance
Section titled “Use the builder instance”docker buildx build \ --builder MyBuilder \ --load .
Switch to the builder instance
Section titled “Switch to the builder instance”To switch to the builder instance, use the following command:
docker buildx use MyBuilder
More info: Docker Buildx documentation