Zhofang commited on
Commit
9f69786
·
verified ·
1 Parent(s): 53e940f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Node.js runtime as a parent image
2
+ FROM node:18-alpine
3
+
4
+ # Set the working directory to /app
5
+ WORKDIR /app
6
+
7
+ RUN npm init -y
8
+
9
+ # Copy package.json and package-lock.json (if available)
10
+ COPY package*.json ./
11
+
12
+ # Install app dependencies
13
+ RUN npm install --only=production
14
+
15
+ # Bundle app source
16
+ COPY . .
17
+
18
+ # Expose the port the app runs on
19
+ EXPOSE 7860
20
+
21
+ # Define the command to run your app
22
+ CMD [ "node", "app.js" ]