multi-lang-dev
Go to file
fly6516 46b2327c7f
Some checks failed
build-docker-images-for-latest-release / build-and-push (push) Failing after 11s
docs(README): 更新多语言项目文档
- 添加英文版本说明- 补充中文版本内容- 详细描述项目概述、前提条件、编译步骤和使用方法
- 优化文档结构,增加目录链接
2025-03-05 14:02:34 +08:00
.gitea/workflows ci:enabled main.yaml 2025-01-01 08:21:28 +08:00
Dockerfile docs:add compile guide 2025-01-01 08:58:45 +08:00
LICENSE Initial commit 2024-12-18 03:24:16 +00:00
README.md docs(README): 更新多语言项目文档 2025-03-05 14:02:34 +08:00

Multi-Lang / 多语言项目

English Version | 中文版本


English Version

Overview

Multi-Lang is a Docker multi-architecture build project that demonstrates how to build and push Docker images for various platforms. This project leverages Docker Buildx and QEMU for cross-platform builds.

Prerequisites

  • Docker (with Buildx support)
  • QEMU for multi-architecture emulation

Build Instructions

  1. Create and Enable Buildx Builder
    Create a new Buildx builder instance and switch to it:

    docker buildx create --use
    
  2. Start QEMU Multi-Architecture Emulator
    Run the following command to start QEMU with multi-arch support:

    docker run --rm --privileged fly6516.synology.me:8080/multiarch/qemu-user-static --reset -p yes
    
  3. Build and Push Multi-Arch Docker Image
    Build your Docker image for multiple architectures and push it to the registry:

    docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x,linux/mips64le -t fly6516.synology.me:8080/multilang:latest . --push
    

Usage

After pushing the image, you can deploy it on the supported platforms using your preferred orchestration tools.


中文版本


中文版本

概述

Multi-Lang 是一个 Docker 多架构构建项目,展示了如何利用 Docker Buildx 与 QEMU 构建并推送支持多种平台的 Docker 镜像。

前提条件

  • 安装支持 Buildx 的 Docker
  • 配置 QEMU 以支持多架构模拟

编译步骤

  1. 创建并启用 Buildx 构建器
    创建一个新的 Buildx 构建器实例并切换到该实例:

    docker buildx create --use
    
  2. 启动 QEMU 多架构模拟器
    执行以下命令以启动 QEMU 多架构支持:

    docker run --rm --privileged fly6516.synology.me:8080/multiarch/qemu-user-static --reset -p yes
    
  3. 构建并推送多架构 Docker 镜像
    针对多个平台构建 Docker 镜像,并将其推送到镜像仓库:

    docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x,linux/mips64le -t fly6516.synology.me:8080/multilang:latest . --push
    

使用方法

镜像推送成功后,您可以使用您偏好的编排工具在各个平台上进行部署。


English Version