Docker支持多架構linux
注:
要求19.03以上版本(如下的不支持,Ubuntu 18.04的docker默認版本爲19.03)docker
建立支持多架構的docker image (加buildx命令)bootstrap
export DOCKER_CLI_EXPERIMENTAL=enabled (做用是啓用buildx)
docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3 (註冊ARM架構)
cat /proc/sys/fs/binfmt_misc/qemu-aarch64 (確保enabled)
docker buildx create --driver docker-container --use
docker buildx inspect --bootstrap
docker buildx ls (此時會多出來arm、arm6四、ppc64le等)
docker buildx build --platform linux/arm/v7,local --load -t ming:1.0 .