Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
FROM node:16 as builder
|
2 |
|
|
|
3 |
WORKDIR /build
|
4 |
-
RUN git clone https://github.com/MartialBE/one-hub.git .
|
|
|
5 |
RUN wget -qO- -t1 -T2 "https://api.github.com/repos/MartialBE/one-hub/releases" | \
|
6 |
grep "tag_name" | \
|
7 |
head -n 1 | \
|
8 |
awk -F ":" '{print $2}' | \
|
9 |
sed 's/\"//g;s/,//g;s/ //g' > VERSION
|
10 |
|
|
|
11 |
RUN sed -i'' 's|router.Group("/v1|router.Group("/api/v1|g' /build/router/relay-router.go
|
12 |
RUN sed -i'' 's|HasPrefix(path, "/v1|HasPrefix(path, "/api/v1|g' /build/relay/common.go
|
13 |
|
|
|
1 |
FROM node:16 as builder
|
2 |
|
3 |
+
|
4 |
WORKDIR /build
|
5 |
+
#RUN git clone https://github.com/MartialBE/one-hub.git .
|
6 |
+
RUN git clone -b 0.14.3 https://github.com/MartialBE/one-hub.git .
|
7 |
RUN wget -qO- -t1 -T2 "https://api.github.com/repos/MartialBE/one-hub/releases" | \
|
8 |
grep "tag_name" | \
|
9 |
head -n 1 | \
|
10 |
awk -F ":" '{print $2}' | \
|
11 |
sed 's/\"//g;s/,//g;s/ //g' > VERSION
|
12 |
|
13 |
+
|
14 |
RUN sed -i'' 's|router.Group("/v1|router.Group("/api/v1|g' /build/router/relay-router.go
|
15 |
RUN sed -i'' 's|HasPrefix(path, "/v1|HasPrefix(path, "/api/v1|g' /build/relay/common.go
|
16 |
|