Files
Will Anderson 93096ea5b6 add sandbox stub service - 4-route placeholder until real soul wires up
Go HTTP server with five handlers:
  GET  /             -> 200 {env, status, soul}
  GET  /health       -> 200 {ok:true}
  POST /api/share    -> 410 not_available_in_sandbox
  GET  /said         -> 410 not_available_in_sandbox
  GET  /share/*      -> 410 not_available_in_sandbox
  any  other         -> 404 not_found

Distroless final image. Cross-compiled on host (Apple Silicon QEMU + Go
crashes with lfstack.push when go build runs inside an emulated linux/amd64
container). Pushed to us-central1-docker.pkg.dev/neuron-785695/neuron-sandbox/sandbox:initial.

Replaced when the real soul build pipeline lands.
2026-05-02 12:53:00 -05:00

18 lines
722 B
Docker

# Pre-built binary in (this directory)/build/sandbox-stub-linux-amd64.
# We cross-compile on the host (Apple Silicon -> linux/amd64) instead of
# running `go build` inside an emulated amd64 container, which crashes Go's
# runtime (lfstack.push fatal) under QEMU/Rosetta.
#
# Build script:
# GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
# go build -trimpath -ldflags="-s -w" -o build/sandbox-stub-linux-amd64 ./...
# docker buildx build --platform linux/amd64 \
# -t us-central1-docker.pkg.dev/neuron-785695/neuron-sandbox/sandbox:initial \
# --push .
FROM gcr.io/distroless/static-debian12:nonroot
COPY build/sandbox-stub-linux-amd64 /sandbox-stub
EXPOSE 8080
USER nonroot:nonroot
ENTRYPOINT ["/sandbox-stub"]