mirror of
https://github.com/hanzoai/world-zap.git
synced 2026-10-30 14:55:43 +00:00
Workspace-wide sync. luxfi/node already shipped on 1.26.4 in v1.30.6 (commit 121aca1fa9); this is the cross-repo catch-up.
21 lines
603 B
Docker
21 lines
603 B
Docker
# syntax=docker/dockerfile:1.7
|
|
FROM golang:1.26.4-alpine AS build
|
|
WORKDIR /src
|
|
RUN apk add --no-cache git ca-certificates
|
|
COPY go.mod go.sum* ./
|
|
RUN go mod download
|
|
COPY . .
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
ENV CGO_ENABLED=0
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} \
|
|
go build -trimpath -ldflags="-s -w" -o /out/world-gw .
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY --from=build /out/world-gw /world-gw
|
|
# Single listener serves both /zap (WebSocket) and /mcp (JSON-RPC/SSE).
|
|
EXPOSE 9999
|
|
USER nonroot
|
|
ENTRYPOINT ["/world-gw"]
|