小记下,每次搜也挺麻烦。来自:https://yeasy.gitbook.io/docker_practice/buildx/multi-arch-images
刚好上次部署完大模型,直接使用WSL比VMware打开虚拟机方便多了。
sudo docker run --rm --privileged tonistiigi/binfmt:latest --install all
sudo docker buildx create --name mybuilder --driver docker-container
sudo docker buildx use mybuilder
#直接构建对应架构:
sudo docker buildx build --platform linux/arm,linux/arm64 -t run/dns:2.0 . --load
#查看可构建架构:
sudo docker buildx ls