mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-24 05:20:01 +00:00
Merge pull request #145 from mritd/master
chore(docker): add build flag
This commit is contained in:
commit
5724ff3025
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -18,7 +18,7 @@ RUN set -ex \
|
||||
&& export VERSION=$(git describe --tags) \
|
||||
&& export COMMIT=$(git rev-parse HEAD) \
|
||||
&& export TIMESTAMP=$(date "+%F %T") \
|
||||
&& go build -o /go/bin/hysteria -ldflags \
|
||||
&& go build -trimpath -o /go/bin/hysteria -ldflags \
|
||||
"-w -s -X 'main.appVersion=${VERSION}' \
|
||||
-X 'main.appCommit=${COMMIT}' \
|
||||
-X 'main.appDate=${TIMESTAMP}'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user