Skip to content

Docker: smaller hardened runtime image #2833

Closed

Description

@CloneOfAlex

Which client?

All / shared core

The problem

The runtime image is node:22-slim with the tarball installed globally: the base is not pinned by digest, transitive dependencies are resolved fresh at build time rather than from the lockfile CI tested, install scripts run, and Node runs as PID 1 without an init to reap orphaned grandchildren (which npx-launched stdio servers create).

Solution you have in mind (optional)

  • Builder: npm ci instead of npm install.
  • Ship an npm-shrinkwrap.json (or install from the lockfile) so the image runs the tested dependency tree.
  • Runtime: npm install -g --ignore-scripts, base pinned by digest, tini as entrypoint (or document docker run --init), optionally a distroless/alpine variant.
  • Healthcheck probes /healthz.

Alternatives or workarounds you have tried

docker run --init covers the PID 1 part today but is not documented in docs/docker.md.

Already built it locally?

No response

Before you submit

  • I searched existing issues and this is not a duplicate.
  • This is a request for the Inspector itself, not for the MCP specification or an SDK.

Activity

  1. cliffhall commented on Oct 29, 2026

    @cliffhall
    Member

    Triage: Priority Low (total 4)

    • Severity 2 — image hardening with no reported breakage
    • Urgency 2 — wanted eventually, nothing blocked on it
    • Bonuses: none (no milestone, assignee, epic, engagement or reporter-set priority)

    Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

  2. added this to the v2.15.0 milestone on Oct 29, 2026
  3. self-assigned this
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature requestv2Issues and PRs for v2

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions