File size: 684 Bytes
51b3ce0
 
 
 
b771707
c73b2a3
6c8cde5
51b3ce0
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM golang:1.23-alpine AS builder

WORKDIR /app
RUN apk add git make && git clone https://github.com/bincooo/chatgpt-adapter.git -b v3.0.0-beta .
RUN go mod tidy && ls -al /go/pkg/mod
RUN sed -i 's/ind := strings.Index(path, importPath)/ind := strings.Index(path, importPath)\n    if ind == -1 {\n    return path }\n    println(path + ", " + importPath)/g' \
   /go/pkg/mod/github.com/bincooo/[email protected]/internal/module/interface.go
RUN make install
RUN make build-linux

FROM alpine:3.19.0
WORKDIR /app
COPY --from=builder /app/bin/linux/server ./server
RUN chmod +x server

ENV ARG "--port 8080"
CMD ["./server ${ARG}"]
ENTRYPOINT ["sh", "-c"]