Address PR #1648 review: - Bump the GHCR action majors to match current v1 (docker/login-action v4, docker/metadata-action v6, docker/setup-buildx-action v4, actions/attest-build-provenance v4) to avoid Dependabot churn. - Make the image tags explicit (`type=semver` + `flavor: latest=true`) instead of relying on `flavor.latest=auto`, so a release lands both the version tags and `:latest` — the README's bare `ghcr.io/…/inspector` URL won't 404. - Run the container as the non-root `node` user with /home/node as workdir (its writable home is where the inspector stores the catalog / OAuth state). - Add a HEALTHCHECK that probes `/` via Node's global fetch (no curl in slim). - Trim specification/ and docs/ from the build context. (test-servers/ stays — `tsc -b` typechecks the integration tests that import its alias, so excluding it breaks the build.) Re-verified locally: `docker build` succeeds, the container runs as uid 1000 (node), serves `/` (200), and the HEALTHCHECK reports healthy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BrihGWcrM9JGRyu41nzZYw
38 lines
887 B
Text
38 lines
887 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
|
|
|
|
# Docs/specs aren't referenced by the build — trim them from the context.
|
|
# (test-servers/ stays: `tsc -b` typechecks the integration tests that import
|
|
# the `@modelcontextprotocol/inspector-test-server` alias.)
|
|
specification
|
|
docs
|
|
|
|
# Packed tarballs (the image makes its own)
|
|
*.tgz
|
|
|
|
# Local / editor / env
|
|
.env
|
|
.env.*
|
|
.DS_Store
|
|
.vscode
|
|
.idea
|
|
.claude
|
|
.playwright-mcp
|
|
*.log
|