Build amd64 and arm64 for docker images
docker buildx for multiarch support
create a builder
because the default builder doesn't support multi-arch building,
create a new builder with docker-container driver and use it
1 | docker buildx create --use --name multiarch --driver docker-container |
if your self-build registry is not https, please touch a buildkitd.toml
1 | [registry."your-registry-domain or ip"] |
and then use this config to create a builder
1 | if your builder has already existed, delete it and create |
build the multiarch image and push it to your registry
docker buildx inspect --bootstrap
to get the supported platform information
1 | don't ignore the trailing dot, it's to search the current directory's Dockerfile file |