Publish MCP server as a Docker image - #2111
Conversation
Configure MCP server releases to use the Docker publisher and reuse inferred Docker build options so the release follows RFC-DX-076's monorepo-root build-context model. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Explain that package projects must explicitly select the Docker release publisher so Nx does not publish an npm package instead of the container image. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevent Nx from selecting the npm publisher for Docker-only package projects, allowing the inferred Docker release publisher to run without a project-level target override. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the release fix focused on preventing npm publication of the Docker-only MCP server and remove the unrelated Docker plugin refactor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
eaf8ca8 to
1cc2668
Compare
Use the Docker release repository as the shared image-name source so MCP needs no duplicated configuration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe the change from npm publishing to versioned Docker image publishing in the MCP release plan. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Include the Docker plugin and documentation site in the version plan required by their release validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Pull request overview
Updates Nx Docker plugin documentation and MCP server configuration so Docker-only projects publish container images via Nx Release (rather than npm), and documents the default RFC-DX-076 “Option 4” build layout.
Changes:
- Document Docker-only release configuration using
release.docker.repositoryNameand"private": true. - Document the default Dockerfile/context layout (Dockerfile in project root, monorepo-root context
.). - Update
apps/mcpserverto publish Docker images viarelease.docker.repositoryNameand mark the package as private.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/nx-dx-docker-plugin/README.md | Updates README guidance for Docker-only releases and default build layout. |
| apps/website/docs/containers/nx-docker-release.md | Aligns website docs with release.docker.repositoryName and clarifies Docker-only publishing behavior. |
| apps/mcpserver/package.json | Switches MCP server release config to Docker publishing and marks package private. |
| .nx/version-plans/version-plan-1788168499661.md | Adds version plan entry describing the release/config/doc updates. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Make the release guidance self-contained and distinguish private package projects from projects without package manifests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
packages/nx-dx-docker-plugin/README.md:235
- This example is introduced as 'Package projects can configure Docker release publishing', but it includes
\"private\": true, which is only required when Docker is the only release artifact (to prevent npm publishing). To avoid misleading npm+docker consumers, either (a) add a note thatprivateis only for Docker-only releases, or (b) split into two examples (Docker-only vs npm+docker) withoutprivatein the general case.
There was a problem hiding this comment.
🟡 Changes recommended
The MCP project is not selected by the release workflow, so its Docker publisher will not run.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Balanced
| { | ||
| "name": "@pagopa/dx-mcpserver", | ||
| "version": "0.2.14", | ||
| "private": true, |
There was a problem hiding this comment.
Fixed by adding the public tag. However, I don't really like the devex of this solution, I'll work on it further after vacation.
Otherwise it can be merged and I'll reiterate on it.
There was a problem hiding this comment.
Hello, I've taken this task for this sprint.
Using the "private" field of package.json was our own convention when we used to publish only NPM packages, but it's a misuse of this property.
Since it actually refers to the visibility in the NPM registry (because packages can be published as public or private...), we repurposed this field to say "private = do not publish", but I think it is time to move on from this pattern.
Fortunately, Nx has a feature for this purpose: Release Groups!
We just need to create two release groups:
- "applications" = ghcr
- "npm-packages" = npm
This project (mcpserver) will be assigned to the applications group.
Keep the MCP package private for npm while marking its Nx project public so release-v2 includes the Docker publisher. Clarify the release documentation and version plan.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-mud-0405c6703-2111.westeurope.1.azurestaticapps.net |
Why
release-v2invokesnx release publish. Because the MCP server was not marked private, Nx treated it as a publishable npm package and selected@nx/js:release-publish. The release therefore published the npm package, while no Docker image was built or pushed.What changes
release.docker.repositoryNameto activate the inferred DX Docker publisher; the same value is reused for normal Docker builds, avoiding duplicate image configuration.Resolves CES-2298