Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +10 -0
Dockerfile
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM golang:1.22-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 -ldflags="-s -w" -o server .
|
| 7 |
+
|
| 8 |
+
FROM scratch
|
| 9 |
+
COPY --from=builder /app/server /server
|
| 10 |
+
EXPOSE 7860
|