Skip to content

Docker Buildx多平台构建 #55

@ZJUPJM

Description

@ZJUPJM

功能摘要 / Feature Summary

利用Docker Buildx的多平台构建能力,支持多平台构建

功能类型 / Feature Type

全新功能 / New Feature

优先级 / Priority

高 - 非常需要这个功能 / High - Really need this feature

问题描述 / Problem Description

当前项目为x86和arm64维护了两套独立的构建配置:

  • pipeline/independent/x86/ - 完整的x86构建脚本和Dockerfile
  • pipeline/independent/arm64/ - 完整的arm64构建脚本和Dockerfile

这导致:

  1. 代码重复,维护成本高
  2. 两套配置容易产生不一致
  3. 未利用Docker Buildx的多平台构建能力

建议的解决方案 / Proposed Solution

  1. 重构Dockerfile,使用多阶段构建和平台变量
  2. 统一构建脚本,使用 docker buildx build --platform linux/amd64,linux/arm64
  3. 移除重复的平台特定配置
  4. 更新CI/CD workflow以支持多平台构建

替代方案 / Alternative Solutions

No response

确认事项 / Confirmations

  • 我已经搜索了现有的 issues 和讨论,确认这不是重复建议
    I have searched existing issues and discussions, confirming this is not a duplicate suggestion

  • 这个功能符合项目的目标和范围
    This feature aligns with the project's goals and scope

  • 我理解这个功能可能需要时间来实现
    I understand this feature may take time to implement

  • 我愿意协助实现这个功能 (可选)
    I'm willing to help implement this feature (optional)

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions