sanbo1200 commited on
Commit
260aa6b
·
verified ·
1 Parent(s): 8b2c25a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -0
Dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM golang:1.23-alpine AS builder
2
+ WORKDIR /app
3
+ COPY go.mod go.sum ./
4
+ RUN go mod download
5
+ COPY . .
6
+ RUN CGO_ENABLED=0 go build -o main .
7
+
8
+ FROM alpine:latest
9
+ RUN apk --no-cache add ca-certificates
10
+ WORKDIR /app
11
+ COPY --from=builder /app/main .
12
+ EXPOSE 8080
13
+ CMD ["./main"]