forked from tesla0225/mcp-create
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 931 Bytes
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 931 Bytes
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
# ビルドステージ
FROM node:20-slim AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# 実行ステージ
FROM node:20-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-minimal \
python3-pip \
curl \
which && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
ln -sf /usr/bin/python3 /usr/bin/python && \
npm install -g ts-node typescript
ENV PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
ENV NODE_PATH="/app/node_modules"
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY --from=builder /app/build ./build
COPY --from=builder /app/node_modules ./node_modules
# package.jsonをコピーして"type": "module"設定を確実に継承
COPY --from=builder /app/package*.json ./
RUN chmod +x build/index.js && \
mkdir -p /tmp/mcp-create-servers && \
chmod 777 /tmp/mcp-create-servers
CMD ["node", "build/index.js"]