Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
github-mcp-server/Dockerfile at v2.0.1 · github/github-mcp-server · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
github
github-mcp-server
Repository navigation
Code
Issues
194
(194)
Pull requests
188
(188)
Discussions
Actions
Security and quality
2
(2)
Insights
More
items
Files
Expand file tree
v2.0.1
Breadcrumbs
github-mcp-server
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
52 lines (43 loc) · 2.21 KB
v2.0.1
Breadcrumbs
github-mcp-server
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
52 lines (43 loc) · 2.21 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM
node:26-alpine@sha256:e88a35be04478413b7c71c455cd9865de9b9360e1f43456be5951032d7ac1a66 AS ui-build
WORKDIR
/app
COPY
ui/package*.json ./ui/
RUN
cd ui && npm ci
COPY
ui/ ./ui/
#
Create output directory and build - vite outputs directly to pkg/github/ui_dist/
RUN
mkdir -p ./pkg/github/ui_dist && \
cd ui && npm run build
FROM
golang:1.27.1-alpine@sha256:8a5910f31396cd4d89662f56c68b3ae31d374308270a1c3bd96672ee5ed43414 AS build
ARG
VERSION=
"dev"
#
Set the working directory
WORKDIR
/build
#
Install git
RUN
--mount=type=cache,target=/var/cache/apk \
apk add git
#
Copy source code (including ui_dist placeholder)
COPY
. .
#
Copy built UI assets over the placeholder
COPY
--from=ui-build /app/pkg/github/ui_dist/* ./pkg/github/ui_dist/
#
Build the server
#
OAuth credentials are injected via build secrets so they are not baked into image history; the values are public in practice but kept out of layers.
RUN
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=secret,id=oauth_client_id \
--mount=type=secret,id=oauth_client_secret \
export OAUTH_CLIENT_ID=
"$(cat /run/secrets/oauth_client_id 2>/dev/null || echo '')"
&& \
export OAUTH_CLIENT_SECRET=
"$(cat /run/secrets/oauth_client_secret 2>/dev/null || echo '')"
&& \
CGO_ENABLED=0 go build -ldflags=
"-s -w -X main.version=${VERSION} -X main.commit=$(git rev-parse HEAD) -X main.date=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X github.com/github/github-mcp-server/v2/internal/buildinfo.OAuthClientID=${OAUTH_CLIENT_ID} -X github.com/github/github-mcp-server/v2/internal/buildinfo.OAuthClientSecret=${OAUTH_CLIENT_SECRET}"
\
-o /bin/github-mcp-server ./cmd/github-mcp-server
#
Make a stage to run the app
FROM
gcr.io/distroless/base-debian12@sha256:fabbf1c0c357a3d42550111351daed089b20a2c954df13ee2fcff60602515e84
#
Add required MCP server annotation
LABEL
io.modelcontextprotocol.server.name=
"io.github.github/github-mcp-server"
#
Set the working directory
WORKDIR
/server
#
Copy the binary from the build stage
COPY
--from=build /bin/github-mcp-server .
#
Expose the default port
EXPOSE
8082
#
Set the entrypoint to the server binary
ENTRYPOINT
[
"/server/github-mcp-server"
]
#
Default arguments for ENTRYPOINT
CMD
[
"stdio"
]
You can’t perform that action at this time.