feat: add Dockerfile for building and running saveany-bot

This commit is contained in:
krau
2025-01-20 12:07:02 +08:00
parent a778b0fa8c
commit cd663d05ca

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM golang:alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o saveany-bot .
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/saveany-bot .
CMD ["./saveany-bot"]