Skip to content

Publish MCP server as a Docker image - #2111

Open
christian-calabrese wants to merge 10 commits into
mainfrom
fixes/mcp-server-docker-release
Open

Publish MCP server as a Docker image#2111
christian-calabrese wants to merge 10 commits into
mainfrom
fixes/mcp-server-docker-release

Conversation

@christian-calabrese

@christian-calabrese christian-calabrese commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Why

release-v2 invokes nx 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

  • Mark MCP as a private package: its release artifact is the Docker image, not an npm package.
  • Configure release.docker.repositoryName to activate the inferred DX Docker publisher; the same value is reused for normal Docker builds, avoiding duplicate image configuration.
  • Document this composition and the RFC-DX-076 Option 4 build-context model.

Resolves CES-2298

christian-calabrese and others added 4 commits September 1, 2026 11:17
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>
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>
@christian-calabrese christian-calabrese changed the title Publish MCP server Docker releases Publish MCP server as a Docker image Sep 1, 2026
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>
@christian-calabrese
christian-calabrese marked this pull request as ready for review September 1, 2026 09:46
@christian-calabrese
christian-calabrese requested a review from a team as a code owner September 1, 2026 09:46
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>
@christian-calabrese
christian-calabrese requested a balanced review from Copilot September 1, 2026 10:10
Copilot stopped reviewing on behalf of christian-calabrese due to an error September 1, 2026 10:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.repositoryName and "private": true.
  • Document the default Dockerfile/context layout (Dockerfile in project root, monorepo-root context .).
  • Update apps/mcpserver to publish Docker images via release.docker.repositoryName and 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.

Comment thread packages/nx-dx-docker-plugin/README.md Outdated
Comment thread packages/nx-dx-docker-plugin/README.md Outdated
Comment thread apps/website/docs/containers/nx-docker-release.md Outdated
Comment thread .nx/version-plans/version-plan-1788168499661.md Outdated
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>
@christian-calabrese
christian-calabrese requested review from krusty93 and a balanced review from Copilot September 2, 2026 08:30
Copilot stopped reviewing on behalf of christian-calabrese due to an error September 2, 2026 09:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 that private is only for Docker-only releases, or (b) split into two examples (Docker-only vs npm+docker) without private in the general case.

Comment thread apps/website/docs/containers/nx-docker-release.md
Comment thread packages/nx-dx-docker-plugin/README.md Outdated
@gunzip
gunzip requested a balanced review from Copilot September 3, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what about this one @christian-calabrese ?

@christian-calabrese christian-calabrese Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@lucacavallaro lucacavallaro Sep 9, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-mud-0405c6703-2111.westeurope.1.azurestaticapps.net

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.

5 participants