From 97e9aa2700ef7a6a0ffba557fb68e9c519da86ef Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Fri, 30 May 2025 11:13:49 +0300 Subject: [PATCH 1/2] fix: use ENTRYPOINT and CMD for proper argument handling - 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 tools Before: CMD ["./github-mcp-server", "stdio"] After: ENTRYPOINT ["./github-mcp-server"] + CMD ["stdio"] --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 333ac010..28fb3948 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,5 +22,7 @@ FROM gcr.io/distroless/base-debian12 WORKDIR /server # Copy the binary from the build stage COPY --from=build /bin/github-mcp-server . -# Command to run the server -CMD ["./github-mcp-server", "stdio"] +# Set the entrypoint to the server binary +ENTRYPOINT ["./github-mcp-server"] +# Default command arguments +CMD ["stdio"] From 8cc482ce0d12d91d64265a3393a1cda1603ce4f3 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Fri, 30 May 2025 11:31:54 +0300 Subject: [PATCH 2/2] address review feedback: use absolute path and improve comments --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 28fb3948..1281db4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,6 @@ WORKDIR /server # Copy the binary from the build stage COPY --from=build /bin/github-mcp-server . # Set the entrypoint to the server binary -ENTRYPOINT ["./github-mcp-server"] -# Default command arguments +ENTRYPOINT ["/server/github-mcp-server"] +# Default arguments for ENTRYPOINT CMD ["stdio"]