forked from kimtaeyoon83/mcp-server-youtube-transcript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 707 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (23 loc) · 707 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
# Stage 1: Build the application
FROM node:18-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json package-lock.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application
COPY . .
# Build the application
RUN npm run build
# Stage 2: Create the production image
FROM node:18-alpine AS production
# Set working directory
WORKDIR /app
# Copy the built files from the builder stage
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package-lock.json /app/
# Install production dependencies only
RUN npm ci --omit=dev
# Specify the default command
ENTRYPOINT ["node", "dist/index.js"]