Skip to content

Commit 6ee7627

Browse files
committed
Initial work for adding a Dockerfile and creating an image for inspector
Fixes modelcontextprotocol#237
1 parent fa7f9c8 commit 6ee7627

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

.dockerignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Version control
2+
.git
3+
.gitignore
4+
5+
# Node.js
6+
node_modules
7+
npm-debug.log
8+
9+
# Build artifacts
10+
client/dist
11+
client/build
12+
server/dist
13+
server/build
14+
15+
# Environment variables
16+
.env
17+
.env.local
18+
.env.development
19+
.env.test
20+
.env.production
21+
22+
# Editor files
23+
.vscode
24+
.idea
25+
26+
# Logs
27+
logs
28+
*.log
29+
30+
# Testing
31+
coverage
32+
33+
# Docker
34+
Dockerfile
35+
.dockerignore

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM node:22-slim
2+
3+
# Set working directory
4+
WORKDIR /app
5+
6+
# Copy files
7+
COPY . .
8+
9+
# Install dependencies
10+
# Working around https://github.com/npm/cli/issues/4828
11+
# RUN npm ci
12+
RUN npm install --no-package-lock
13+
14+
# Build the application
15+
RUN npm run build
16+
17+
ENV CLIENT_PORT=6274
18+
ENV SERVER_PORT=6277
19+
20+
# Expose the CLIENT_PORT and SERVER_PORT
21+
EXPOSE $CLIENT_PORT
22+
EXPOSE $SERVER_PORT
23+
24+
# Use ENTRYPOINT with CMD for arguments
25+
ENTRYPOINT ["npm", "start"]
26+
CMD []

0 commit comments

Comments
 (0)