docs(docker): update docker doc

update docker doc

Signed-off-by: mritd <mritd@linux.com>
This commit is contained in:
mritd 2021-11-09 17:50:06 +08:00
parent 6942ae271c
commit 5cd6195f76
No known key found for this signature in database
GPG Key ID: 150E1851F767CDDD
2 changed files with 7 additions and 2 deletions

View File

@ -21,9 +21,12 @@ You can mount the configuration file to any location of the docker container and
In the following commands, we assume that the **`/root/hysteria.json`** configuration
file is mounted to **`/etc/hysteria.json`**:
⚠️ Note: **If you don't want to use the host network (`--network=host`), please make sure that
the hysteria UDP port is correctly mapped (`-p 1234:1234/udp`)**
```sh
# Please replace `/root/hysteria.json` with the actual configuration file location
docker run -dt --name hysteria \
docker run -dt --network=host --name hysteria \
-v /root/hysteria.json:/etc/hysteria.json \
tobyxdd/hysteria -config /etc/hysteria.json server
```

View File

@ -19,9 +19,11 @@ hysteria 二进制可执行文件默认被安装到 `/usr/local/bin/hysteria`
在下面的命令中我们假设将 **`/root/hysteria.json`** 配置文件挂载为容器内的 **`/etc/hysteria.json`** 文件。
⚠️ 注意: 如果您不想使用宿主机网络(`--network=host`),请确保正确的映射了 hysteria 的 UDP 端口(`-p 1234:1234/udp`)。
```sh
# Please replace `/root/hysteria.json` with the actual configuration file location
docker run -dt --name hysteria \
docker run -dt --network=host --name hysteria \
-v /root/hysteria.json:/etc/hysteria.json \
tobyxdd/hysteria -config /etc/hysteria.json server
```