This commit is contained in:
cangui 2025-05-06 18:59:47 +02:00
parent 7e0a59e7cf
commit f754d8f0b5

View File

@ -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