mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
Merge pull request #17929 from zhasm/automated-cherry-pick-of-#17927-upstream-release-3.9
Automated cherry pick of #17927: fix(docker buildx cross platform docker image fix): 跨平台编译docker镜像明确指定架构
This commit is contained in:
@@ -117,7 +117,13 @@ build_image() {
|
||||
;;
|
||||
esac
|
||||
else
|
||||
docker buildx build -t "$tag" -f "$2" "$3" --push
|
||||
if [[ "$tag" == *"amd64" || "$ARCH" == "" || "$ARCH" == "amd64" || "$ARCH" == "x86_64" || "$ARCH" == "x86" ]]; then
|
||||
docker buildx build -t "$tag" -f "$file" "$path" --push --platform linux/amd64
|
||||
elif [[ "$tag" == *"arm64" || "$ARCH" == "arm64" ]]; then
|
||||
docker buildx build -t "$tag" -f "$file" "$path" --push --platform linux/amd64
|
||||
else
|
||||
docker buildx build -t "$tag" -f "$file" "$path" --push
|
||||
fi
|
||||
docker pull "$tag"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user