Run Lineward in a container, on your own base image
Lineward publishes no image: you build one from the release binary, on the base image your organisation approves, with container.Dockerfile. It runs any command, check by default, and serves MCP to an agent on the same machine: over stdio inside the agent’s container, or over HTTP on the host’s network. Non-root, nothing downloaded at runtime, no network needed.
What the binary needs
| Platform | Linux x86_64, glibc 2.31 or newer (Debian 11+, Ubuntu 20.04+, RHEL 9+), libgcc_s |
| git | Only for check --since; install it in your base if you use it |
| User | Any non-root user; the project can be mounted read-only |
| Network | None. The MCP server listens on the local machine only and never dials out |
| License | LINEWARD_LICENSE_KEY — required by check, which exits 3 without it, and by the MCP server: over HTTP it exits 3 before listening, over stdio every tool call answers with an error naming the variable |
Build
Download lineward-linux-x64.tar.gz, THIRD_PARTY_NOTICES.md and SHA256SUMS from the latest release, and container.Dockerfile from the pack repository’s main branch, which holds that release’s recipe, into one directory. To pin a release in CI, replace latest/download with download/v followed by its version, and main with its tag. Check the archive against SHA256SUMS before you build:
curl -LO https://github.com/Lineward/lineward/releases/latest/download/lineward-linux-x64.tar.gz
curl -LO https://github.com/Lineward/lineward/releases/latest/download/THIRD_PARTY_NOTICES.md
curl -LO https://github.com/Lineward/lineward/releases/latest/download/SHA256SUMS
curl -LO https://github.com/Lineward/lineward/raw/main/docs/container.Dockerfile
sha256sum --ignore-missing -c SHA256SUMS
tar -xzf lineward-linux-x64.tar.gz
docker build -f container.Dockerfile --build-arg BASE=registry.internal/base/debian:12-slim -t lineward .Without --build-arg BASE, the recipe uses gcr.io/distroless/cc-debian12:nonroot, which has no git. It copies the binary and its third-party notices, and runs them as a non-root user.
Serve MCP to an agent
Inside the agent’s own container, install the binary the same way and let the agent start lineward mcp --stdio --project /project: it speaks MCP over stdio, with no port at all. For an agent beside the container on the same host, serve it over HTTP:
| Project mount | /project (read-only is fine) |
| MCP endpoint | POST http://127.0.0.1:8080/mcp |
| Health | GET http://127.0.0.1:8081/health → 200 {"status":"ok"} |
docker run --rm --network host \
-v "$PWD/analytics:/project:ro" \
-e LINEWARD_LICENSE_KEY \
lineward mcp --http 8080 --health-port 8081 --project /projectOver HTTP the server listens on loopback only: --bind takes an address in 127.0.0.0/8 or ::1, and any other, 0.0.0.0 included, makes it exit with code 2 before it listens. --network host shares the host’s loopback with the container, so an agent on this machine reaches it, and nothing on another machine does.
The recipe’s entrypoint is lineward and its default command runs check, so the same image runs any command: mcp above, check below.
A one-shot check in CI
docker run --rm -v "$PWD:/project:ro" -e LINEWARD_LICENSE_KEY \
lineward check --project /project --since "$(git merge-base origin/main HEAD)" --format sarif--since needs git in your image and the mounted directory to be a git checkout. Exit 1 fails the job; the SARIF file uploads to any code-scanning view. No warehouse connection is made — the check costs no compute.
Unattended use is a paid capability; one Pro or Team key, passed as LINEWARD_LICENSE_KEY, covers the editor, the pipeline and cloud agents. Container guide · Recipe · Pricing · Agent setup · Releases