-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 985 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (26 loc) · 985 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
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js runtime as a parent image
FROM node:18-alpine AS builder
# Set the working directory in the container
WORKDIR /app
# Copy the package.json and package-lock.json to the working directory
COPY package.json package-lock.json ./
# Install any needed packages specified in package.json
RUN npm install --ignore-scripts
# Copy the current directory contents into the container at /app
COPY . .
# Build the app
RUN npm run build
# Use a smaller node image for the release
FROM node:18-alpine
# Set the working directory in the container
WORKDIR /app
# Copy the built files from the builder
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./
# Install only production dependencies
RUN npm install --omit=dev
# Make port 8080 available to the world outside this container
EXPOSE 8080
# Run the application
ENTRYPOINT ["node", "build/index.js"]