Skip to content

chore: migrate Docker base image from node:22-slim to node:22-alpine#213

Closed
Valiunia wants to merge 1 commit into
mainfrom
docker-migrate-to-alpine
Closed

chore: migrate Docker base image from node:22-slim to node:22-alpine#213
Valiunia wants to merge 1 commit into
mainfrom
docker-migrate-to-alpine

Conversation

@Valiunia

@Valiunia Valiunia commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the Docker base image from node:22-slim (Debian Bookworm) to node:22-alpine. Also swaps npm install for npm ci in the install step.

node:22-slim ships several Debian system packages not needed by this server. Alpine uses OpenSSL directly and omits the gnutls library, removing a class of OS-level package vulnerabilities carried by the Debian slim base.

npm ci installs exactly what is in package-lock.json rather than re-resolving version ranges, making Docker builds reproducible and failing loudly if the lockfile and package.json diverge.

Test plan

  • docker build . completes without errors on the Alpine base
  • Full test suite passes when run inside the built container (docker run --rm <image> sh -c "cd /app && npm test")
  • MCP stdio smoke test: initialize + tools/list handshake completes; all 28 tools register correctly
  • Live API calls verified against three tools inside the running container — all returned correct results
search_and_geocode_tool — forward geocode "Eiffel Tower, Paris"
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_and_geocode_tool","arguments":{"q":"Eiffel Tower, Paris"}}}

Returned multiple ranked results including the Eiffel Tower in Paris, France with correct coordinates.

reverse_geocode_tool — coordinates 40.7484, -73.9857
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"reverse_geocode_tool","arguments":{"longitude":-73.9857,"latitude":40.7484}}}

Returned:

1. 350 Fifth Avenue (350 Fifth Avenue)
   Address: 350 Fifth Avenue, New York, New York 10118, United States
   Coordinates: 40.74843, -73.985667
   Type: address
directions_tool — driving route SF → Oakland
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"directions_tool","arguments":{"coordinates":[{"longitude":-122.4194,"latitude":37.7749},{"longitude":-122.2712,"latitude":37.8044}],"routing_profile":"mapbox/driving"}}}

Returned a route via I-80 East, duration 1522s, distance 19848m, average speed 66 kph.

Notes

Alpine uses musl libc instead of glibc. This server has no native addons compiled against glibc, so no compatibility issues are expected. If a future dependency introduces a native addon with glibc requirements, the base image choice should be revisited at that point.

Switches the base image to Alpine, which uses OpenSSL and omits the
gnutls library entirely, removing a class of OS-level package
vulnerabilities carried by the Debian slim image.

Also replaces `npm install` with `npm ci` for lockfile-exact,
reproducible installs in Docker builds.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

@prisma-cloud-devsecops prisma-cloud-devsecops Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prisma Cloud has found errors in this PR ⬇️

Comment thread Dockerfile
@@ -1,4 +1,4 @@
FROM node:22-slim
FROM node:22-alpine

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openssl 3.5.6-r0 / Dockerfile.FROM

Total vulnerabilities: 9

Critical: 1 High: 8 Medium: 0 Low: 0
Vulnerability IDSeverityCVSSFixed inStatus
CVE-2026-34182 CRITICAL CRITICAL 9.1 3.5.7-r0 Open
CVE-2026-34181 HIGH HIGH 7.4 3.5.7-r0 Open
CVE-2026-34180 HIGH HIGH 7.5 3.5.7-r0 Open
CVE-2026-34183 HIGH HIGH 7.5 3.5.7-r0 Open
CVE-2026-42764 HIGH HIGH 7.5 3.5.7-r0 Open
CVE-2026-45445 HIGH HIGH 7.5 3.5.7-r0 Open
CVE-2026-9076 HIGH HIGH 7.5 3.5.7-r0 Open
CVE-2026-7383 HIGH HIGH 8.1 3.5.7-r0 Open
CVE-2026-45447 HIGH HIGH 8.8 3.5.7-r0 Open

@Valiunia

Copy link
Copy Markdown
Contributor Author

closing because of prisma

@Valiunia Valiunia closed this Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant