diff --git a/Dockerfile b/Dockerfile index 68add7f..61e6354 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,22 @@ # 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=0 GOOS=linux go build -o whatsapp-sender . +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