Files
self-bot/Dockerfile
T

16 lines
329 B
Docker
Raw Normal View History

2025-03-23 13:38:56 -04:00
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"]