# Build stage FROM golang:1.24-alpine AS builder # Installer les dépendances nécessaires pour SQLite3 RUN apk add --no-cache gcc musl-dev WORKDIR /app COPY go.mod go.sum ./ RUN go mod download COPY . . RUN CGO_ENABLED=1 GOOS=linux go build -o whatsapp-sender . # Runtime stage FROM alpine:latest # Installer les librairies nécessaires pour SQLite3 RUN apk add --no-cache libc6-compat WORKDIR /app COPY --from=builder /app/whatsapp-sender . COPY --from=builder /app/public ./public EXPOSE 8080 CMD ["./whatsapp-sender"]