16 lines
329 B
Docker
16 lines
329 B
Docker
FROM golang:1.24-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
# Copy go.mod and go.sum to download dependencies
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
# Copy the rest of the code and build the bot binary
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o bot .
|
|
|
|
FROM alpine:latest
|
|
WORKDIR /app
|
|
COPY --from=builder /app/bot .
|
|
|
|
CMD ["./bot"] |