oki692 commited on
Commit
e155ed6
·
verified ·
1 Parent(s): 5aced9c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -17
Dockerfile CHANGED
@@ -1,22 +1,13 @@
1
- FROM golang:1.22-bullseye AS builder
2
-
3
  WORKDIR /app
4
- COPY main.go .
5
- RUN go mod init ollama-proxy && go build -o server main.go
6
-
7
- FROM debian:bullseye-slim
8
-
9
- RUN apt-get update && apt-get install -y \
10
- curl ca-certificates \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- RUN curl -fsSL https://ollama.com/install.sh | sh
14
 
 
 
15
  WORKDIR /app
16
- COPY --from=builder /app/server .
17
- COPY start.sh .
18
- RUN chmod +x start.sh
19
 
20
  EXPOSE 7860
21
-
22
- CMD ["./start.sh"]
 
1
+ FROM golang:1.21-alpine AS builder
 
2
  WORKDIR /app
3
+ COPY go.mod ./
4
+ COPY *.go ./
5
+ RUN go build -o gateway .
 
 
 
 
 
 
 
6
 
7
+ FROM alpine:latest
8
+ RUN apk --no-cache add ca-certificates
9
  WORKDIR /app
10
+ COPY --from=builder /app/gateway .
 
 
11
 
12
  EXPOSE 7860
13
+ CMD ["./gateway"]