inspector/.dockerignore
cliffhall 941bf13587 ci(docker): add v2 Dockerfile + GHCR publish job (#1646)
v1 published a container image but v2 arrived with no Dockerfile (the
client/server/cli layout is gone). Add a v2 image for the single-package /
launcher architecture and wire the release-gated GHCR publish job.

- `Dockerfile`: two-stage build — stage 1 installs + `npm pack`s the publishable
  tarball; stage 2 `npm install -g`s that tarball, so the image ships the exact
  same artifact as npm with a clean `mcp-inspector` bin. Defaults to `--web` on
  `0.0.0.0:6274`, browser auto-open off. `.dockerignore` keeps the context lean
  and forces a clean in-container install/build.
- `publish-github-container-registry` job in main.yml (ported from v1):
  release-gated, multi-arch (amd64/arm64) build+push to GHCR with a provenance
  attestation. Independent of the npm `publish` job.
- README: document the image + how to run it; the release section now covers
  both publish jobs.

Verified locally: `docker build` succeeds, the container serves `/` (HTTP 200
with the injected token) and dispatches `--cli` / `--tui`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
2026-07-11 00:36:39 -04:00

32 lines
653 B
Text

# Keep the build context small and force a clean, in-container install/build.
# Host node_modules and build outputs are excluded so nothing stale or
# wrong-architecture is copied in — the builder stage runs its own
# `npm install && npm pack`.
.git
.github
# Installed deps (root + every client) — reinstalled in the image
node_modules
clients/*/node_modules
test-servers/node_modules
# Build outputs — rebuilt in the image
clients/*/build
clients/web/dist
test-servers/build
storybook-static
coverage
# Packed tarballs (the image makes its own)
*.tgz
# Local / editor / env
.env
.env.*
.DS_Store
.vscode
.idea
.claude
.playwright-mcp
*.log