Files
self-bot/Dockerfile
T
2025-03-23 13:38:56 -04:00

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"]