Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -2,7 +2,8 @@ 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("/
|
|
|
|
| 6 |
|
| 7 |
WORKDIR /build/web
|
| 8 |
RUN npm install
|
|
@@ -16,7 +17,9 @@ ENV GO111MODULE=on \
|
|
| 16 |
|
| 17 |
WORKDIR /build
|
| 18 |
RUN git clone https://github.com/MartialBE/one-api.git .
|
| 19 |
-
RUN sed -i'' 's|router.Group("/v1|router.Group("/
|
|
|
|
|
|
|
| 20 |
RUN go mod download
|
| 21 |
COPY --from=builder /build/web/build ./web/build
|
| 22 |
RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
|
|
|
| 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
|
|
|
|
| 17 |
|
| 18 |
WORKDIR /build
|
| 19 |
RUN git clone https://github.com/MartialBE/one-api.git .
|
| 20 |
+
RUN sed -i'' 's|router.Group("/v1|router.Group("/api/v1|g' /build/router/relay-router.go
|
| 21 |
+
RUN sed -i'' 's|HasPrefix(path, "/v1|HasPrefix(path, "/api/v1|g' /build/relay/common.go
|
| 22 |
+
|
| 23 |
RUN go mod download
|
| 24 |
COPY --from=builder /build/web/build ./web/build
|
| 25 |
RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|