Skip to content

Commit

Permalink
Updated description to take account for docker architecture compatibi…
Browse files Browse the repository at this point in the history
…lity issues (#45)

* added description for platform specification for docker

* Add Chinese translation

Signed-off-by: Songlin Jiang <[email protected]>

---------

Signed-off-by: Songlin Jiang <[email protected]>
Co-authored-by: Songlin Jiang <[email protected]>
  • Loading branch information
Cliffback and HollowMan6 authored Apr 24, 2024
1 parent a6edc03 commit ead35fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ You can also use this [docker image](https://hub.docker.com/r/hollowman6/mdbook-
docker run --rm -v /path/to/book:/book hollowman6/mdbook-pdf
```

If you encounter architecture compatibility issues, like `docker: no matching manifest for linux/arm64/v8 in the manifest list entries.`, you may need to specify the platform architecture using --platform linux/amd64. The command would then look like this:
```bash
docker run --rm --platform linux/amd64 -v /path/to/book:/book hollowman6/mdbook-pdf
```

If your book have other Rust dependencies, you can install them on your local machine (if using Linux), or if you are not using Linux, download the Linux executables of corresponding architecture to a dir, replace `~/.cargo/bin` with your path.

```bash
Expand Down
6 changes: 6 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ title = "An Example"
docker run --rm -v /path/to/book:/book hollowman6/mdbook-pdf
```

如果您遇到架构兼容性问题,例如`docker: no matching manifest for linux/arm64/v8 in the manifest list entries.`,您可能需要使用 `--platform linux/amd64` 指定平台架构:

````bash
docker run --rm --platform linux/amd64 -v /path/to/book:/book Hollowman6/mdbook-pdf
````

如果你的书有其他 Rust 依赖项,你可以在你的本地机器上安装它们(如果使用 Linux),或者如果你的当前操作系统不是 Linux,将对应架构的 Linux 可执行文件下载到一个目录,用该目录路径替换 `~/.cargo/bin`

```bash
Expand Down

0 comments on commit ead35fc

Please sign in to comment.