forked from apify/apify-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 668 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (23 loc) · 668 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
# Stage 1: Build the project
FROM node:24-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN npm install
# Copy source files
COPY src ./src
COPY tsconfig.json ./
# Build the project
RUN npm run build
# Stage 2: Set up the runtime environment
FROM node:24-alpine
# Set working directory
WORKDIR /app
# Copy only the necessary files from the build stage
COPY --from=builder /app/dist ./dist
COPY package.json package-lock.json ./
# Install production dependencies only
RUN npm ci --omit=dev
# Set the entry point for the container
ENTRYPOINT ["node", "dist/stdio.js"]