Midnightar commited on
Commit
5793e28
·
verified ·
1 Parent(s): efcdeb3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -0
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM golang:1.21-alpine AS build
2
+ WORKDIR /app
3
+ RUN apk add --no-cache git
4
+ COPY . .
5
+ RUN go mod tidy && go build -o server main.go
6
+
7
+ FROM alpine:3.18
8
+ WORKDIR /app
9
+ COPY --from=build /app/server .
10
+ ENV PORT=7860
11
+ EXPOSE 7860
12
+ CMD ["./server"]