-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (30 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
45 lines (30 loc) · 1.09 KB
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
# --- Builder Stage ---
FROM node:22-alpine AS builder
WORKDIR /app
# Install bun
RUN apk add --no-cache bash curl unzip && \
(unset OS; unset SHELL; curl -fsSL https://bun.sh/install | bash)
# Add bun to the PATH
ENV PATH="/root/.bun/bin:$PATH"
# Copy dependency manifests
COPY package.json package-lock.json tsconfig.json ./
# Install dependencies
RUN bun install --ignore-scripts
# Copy the rest of the source code
COPY . .
# Build the application
RUN bun src/mcp-server/build.mts && npx tsc
# --- Release Stage ---
FROM node:22-alpine AS release
WORKDIR /app
ENV NODE_ENV=production
# Copy dependency manifests from builder
COPY --from=builder /app/package.json /app/package-lock.json ./
# Install production-only dependencies
RUN --mount=type=cache,target=/root/.npm \
npm ci --ignore-scripts --omit=dev --prefer-offline --no-audit --progress=false
# Copy built server from builder stage
COPY --from=builder /app/bin ./bin
LABEL io.modelcontextprotocol.server.name="io.github.cloudinary/asset-management-mcp"
# Entrypoint to run the MCP server
ENTRYPOINT ["node", "bin/mcp-server.js"]