Docker
Installation
Pull and run the Spanly CLI from its container image.
The CLI ships as a Docker image at spanly/spanly:latest (Docker Hub)
and ghcr.io/spanly/spanly:latest (GHCR). It is the same Go binary
that npm and Homebrew install, so all subcommands and flags work
identically.
Pull
docker pull spanly/spanly:latestRun
# Wrap a containerised MCP server (same network / compose sidecar):docker run --rm \ -e SPANLY_API_KEY="$SPANLY_API_KEY" \ spanly/spanly:latest run -- node /app/server.js# Or proxy an MCP server reachable from the container.# Point your MCP client at localhost:3001.docker run --rm \ -e SPANLY_API_KEY="$SPANLY_API_KEY" \ -p 3001:3001 \ spanly/spanly:latest proxy host.docker.internal:3000 0.0.0.0:3001For most users the proxy form is the more useful shape inside a
container, since the wrapped child (run -- …) would itself need to
be inside the same image. If your MCP server is already a container,
run Spanly alongside it and proxy. See Sidecar patterns
for compose and Kubernetes examples.
Image tags
| Tag | When to use |
|---|---|
latest | Track the latest stable release. |
<semver> (e.g. 1.4.2) | Pin to a specific version, recommended for production. |
<semver>-alpine | Smaller image based on Alpine. |
nightly | Built from main each night. For testing only. |
Image contents
- A single static Go binary at
/usr/local/bin/spanly. - The default
ENTRYPOINTisspanlyso you only pass subcommand + flags ascommand:/args:. - Built for
linux/amd64andlinux/arm64.
Local development
To run against your local dev Spanly stack, override the ingest URL:
docker run --rm \
-e SPANLY_API_KEY=spanly_us_localdev \
-e SPANLY_INGEST_URL=http://host.docker.internal:3010 \
spanly/spanly:latest proxy host.docker.internal:3000 0.0.0.0:3001