MMM
This commit is contained in:
parent
7e0a59e7cf
commit
f754d8f0b5
@ -1,16 +1,22 @@
|
|||||||
# Build stage
|
# Build stage
|
||||||
FROM golang:1.24-alpine AS builder
|
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
|
WORKDIR /app
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
COPY . .
|
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
|
# Runtime stage
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# Installer les librairies nécessaires pour SQLite3
|
||||||
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/whatsapp-sender .
|
COPY --from=builder /app/whatsapp-sender .
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user