Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: use ENTRYPOINT and CMD for proper argument handling#454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JAORMX wants to merge2 commits intogithub:main
base:main
Choose a base branch
Loading
fromJAORMX:fix/use-entrypoint-for-proper-argument-handling

Conversation

JAORMX
Copy link

Problem

The current Dockerfile usesCMD ["./github-mcp-server", "stdio"] which causes issues when container orchestration tools try to append additional arguments. This results in the entire CMD being replaced rather than arguments being appended.

Root Cause

When using onlyCMD, container runtimes replace the entire command when additional arguments are provided. This breaks argument passing in tools like ToolHive, Kubernetes, and other container orchestrators.

Solution

Implement Docker best practices by using:

  • ENTRYPOINT for the executable that should always run
  • CMD for default arguments that can be overridden/appended to

Changes

Before:

CMD ["./github-mcp-server","stdio"]

After:

ENTRYPOINT ["./github-mcp-server"]CMD ["stdio"]

Benefits

  1. Proper argument handling: Additional arguments are appended to the defaultstdio argument instead of replacing the entire command
  2. Container orchestration compatibility: Works correctly with Kubernetes, Docker Compose, and other tools
  3. Backward compatibility: Default behavior remains the same when no arguments are provided
  4. Docker best practices: Follows recommended patterns for containerized applications

Testing

This change maintains backward compatibility:

  • docker run github-mcp-server → runs./github-mcp-server stdio (same as before)
  • docker run github-mcp-server --toolsets all → runs./github-mcp-server --toolsets all (new capability)

Related Issues

This fixes argument passing issues reported in container orchestration tools where additional arguments couldn't be properly passed to the MCP server.

- Change from CMD to ENTRYPOINT + CMD pattern for better Docker practices- ENTRYPOINT sets the executable that always runs- CMD provides default arguments that can be overridden- This allows container runtimes to properly append additional arguments- Fixes issues with argument passing in container orchestration toolsBefore: CMD ["./github-mcp-server", "stdio"]After: ENTRYPOINT ["./github-mcp-server"] + CMD ["stdio"]
@CopilotCopilotAI review requested due to automatic review settingsMay 30, 2025 08:14
@JAORMXJAORMX requested a review froma team as acode ownerMay 30, 2025 08:14
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Switch from a singleCMD to usingENTRYPOINT plus a defaultCMD in the Dockerfile to enable proper argument appending.

  • IntroduceENTRYPOINT for the server binary
  • Keep defaultstdio argument inCMD
  • Update comments to reflect the change

@SamMorrowDrums
Copy link
Collaborator

This is great, would you mind updating the README.me so that any suggested commands are correct for this change?

@JAORMX
Copy link
Author

@SamMorrowDrums can you explain a little more? I'm not sure anything would need to change from the README

@SamMorrowDrums
Copy link
Collaborator

I haven't double checked, if we don't suggest anything that would need to change that's no problem.

@JAORMX
Copy link
Author

@SamMorrowDrums right! the idea is that nothing changes. But this enables for orchestration platforms to actually be able to pass parameters in an easier way. This wasn't part of the README before, so there was nothing to change.

@SamMorrowDrums
Copy link
Collaborator

The kind of things I was think were additional arguments in the docs like--export-translations which would change from be./github-mcp-server stdio --export-translations tostdio --export-translations if I understand correctly?

Maybe we don't explicitly spell any of them out. I've definitely provided such commands via issues, but that's all I wanted to ensure. I think fortunately the docs are lacking enough that you don't have anything to update.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@JAORMX@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp