discord_bots/Dockerfile

18 lines
288 B
Docker

FROM golang:1.24.1-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /app/bot .
FROM gcr.io/distroless/static-debian11:latest
WORKDIR /app
COPY --from=builder /app/bot .
CMD ["./bot --conf data/.env --db data/data.db"]