Files
whatsapp-mcp-go/whatsapp-mcp-server/Dockerfile
Atul Singh 193e0d3c77 feat: ratelimit, ghcr package support, media path sensitization, LID to CN migration (#6)
* feat: ratelimit, ghcr package and proper project refactor from askarzh

* fix(bridge): validate media path

* update: dependencies

* fix: added LID to contact number migration
2026-05-13 12:54:31 +02:00

31 lines
824 B
Docker

# Build the manager binary
FROM golang:1.25.7 AS builder
ARG TARGETARCH
ARG TARGETOS
WORKDIR /project
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY . .
# Build
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o whatsapp-bridge main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /project
COPY --from=builder /project/whatsapp-bridge .
USER 65532:65532
ENTRYPOINT ["/project/whatsapp-bridge"]