sfun commited on
Commit
e5fd5c8
·
verified ·
1 Parent(s): 2388790

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -2,8 +2,13 @@ FROM node:16 as builder
2
 
3
  WORKDIR /build
4
  RUN git clone https://github.com/MartialBE/one-api.git .
5
- RUN sed -i'' 's|router.Group("/v1|router.Group("/api/v1|g' /build/router/relay-router.go
6
- RUN sed -i'' 's|HasPrefix(path, "/v1|HasPrefix(path, "/api/v1|g' /build/relay/common.go
 
 
 
 
 
7
 
8
  WORKDIR /build/web
9
  RUN npm install
 
2
 
3
  WORKDIR /build
4
  RUN git clone https://github.com/MartialBE/one-api.git .
5
+ RUN 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
+ sed -i'' 's|router.Group("/v1|router.Group("/api/v1|g' /build/router/relay-router.go \
11
+ sed -i'' 's|HasPrefix(path, "/v1|HasPrefix(path, "/api/v1|g' /build/relay/common.go
12
 
13
  WORKDIR /build/web
14
  RUN npm install