add docker file

This commit is contained in:
2023-11-27 17:53:28 +08:00
parent dad4ad2b97
commit 3cc507a767
2 changed files with 20 additions and 0 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
openai-api-route
db.sqlite
/upstreams.yaml

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
FROM golang:1.21 as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make
FROM alpine
COPY --from=builder /app/openai-api-route /openai-api-route
ENTRYPOINT ["/openai-api-route"]