Hub runtime: allocate port 8788, add Go skeleton and Docker deployment

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-10-10 17:11:52 +11:00
parent 26cb4d324d
commit cd56e69a2f
10 changed files with 185 additions and 7 deletions

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
# Multi-stage build. docs/hub-api.md section 1: Go 1.25, static binary,
# distroless runtime, one container on 192.168.20.13.
FROM golang:1.25-alpine AS build
WORKDIR /src
COPY src/ ./
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags='-s -w' -o /out/hub .
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/hub /hub
ENV HUB_PORT=8788
EXPOSE 8788
USER nonroot:nonroot
ENTRYPOINT ["/hub"]