docs(README): 添加多平台构建说明
Some checks failed
build-docker-images-for-latest-release / build-and-push (push) Failing after 0s
Some checks failed
build-docker-images-for-latest-release / build-and-push (push) Failing after 0s
- 新增"Building"章节,介绍如何使用 Docker Buildx 进行多平台构建 - 详细说明了创建和启用 Buildx 构建器、运行 QEMU 以及构建和推送多平台 Docker 镜像的步骤
This commit is contained in:
parent
f37b9b1735
commit
e07083fcca
17
README.md
17
README.md
@ -38,6 +38,23 @@ This project provides a Docker-based multi-language compile environment. It is d
|
||||
### Usage
|
||||
Once inside the container, you can use the pre-installed compilers and tools to compile and run your projects. The working directory is set to `/workspace`.
|
||||
|
||||
### Building
|
||||
|
||||
#### create and enable Buildx builder
|
||||
```bash
|
||||
docker buildx create --use
|
||||
```
|
||||
|
||||
#### run QEMU to emulate multiplatform
|
||||
```bash
|
||||
docker run --rm --privileged fly6516.synology.me:8080/multiarch/qemu-user-static --reset -p yes
|
||||
```
|
||||
|
||||
#### build and push docker image
|
||||
```bash
|
||||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/ppc64le,linux/s390x,linux/mips64le -t fly6516/multilang:latest . --push
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
[中文版本](#中文版本)
|
||||
|
Loading…
Reference in New Issue
Block a user