Skip to content

Commit

Permalink
Merge pull request #10 from gongna-au/feature/command
Browse files Browse the repository at this point in the history
feat:Optimize article structure
  • Loading branch information
gongna-au authored Aug 27, 2024
2 parents ed86ff5 + e9738ce commit 8c28437
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions _posts/2024-07-29-test-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,28 @@ docker buildx build --platform linux/arm64 -t your-image-name:your-tag .
- 在 Apple M1 上,默认构建的镜像是 ARM 架构的
- 如果需要构建适用于不同架构(如 amd64)的镜像,需要在 Buildx 命令中指定相应的平台。

ARM64 架构的镜像:

```shell
docker buildx build --platform linux/arm64 -t test:v1.2 .
docker buildx build --platform linux/arm64 -t test:v1.2 . --load
docker buildx build --platform linux/arm64 -t test:v1.2 .
docker buildx build --platform linux/arm64 -t test:v1.2 . --load
```

运行镜像:

```shell
docker run --privileged -it --platform linux/arm64 -v $(pwd):/demo test:v1.2 /bin/bash
```

AMD64 架构的镜像:

```shell
docker buildx build --platform linux/amd64 -t test:v1.2 .
docker buildx build --platform linux/amd64 -t test:v1.2 . --load
docker buildx build --platform linux/amd64 -t test:v1.2 .
docker buildx build --platform linux/amd64 -t test:v1.2 . --load
```

运行镜像:

```shell
docker run --privileged -it --platform linux/amd64 -v $(pwd):/demo test:v1.2 /bin/bash
```
Expand Down

0 comments on commit 8c28437

Please sign in to comment.