Files
GPTTeamBOT/Dockerfile
2026-03-11 21:55:20 +08:00

22 lines
410 B
Docker

# Build stage
FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /app/go-helper ./cmd
# Run stage
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/go-helper .
COPY image.png .
COPY .env.example .env
ENTRYPOINT ["./go-helper"]