your host already has one buildx builder instance named localbuilder (for example):
docker run this image:
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v /root/.docker/buildx/instances:/root/.docker/buildx/instances gzlj2018/ubuntu:18.04-docker bash
3)you can see buildx builder instance by docker buildx ls
docker buildx use localbuilder
cd /opt/
echo "FROM alpine:3.14" > Dockerfile
docker buildx build -t hub.your-company.com/library/alpine:3.14 --platform=linux/amd64,linux/arm64 . --push
Content type
Image
Digest
Size
217 MB
Last updated
about 5 years ago
docker pull gzlj2018/ubuntu:18.04-docker