Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +10 -10
Dockerfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
# Use
|
2 |
-
FROM node:
|
3 |
|
4 |
-
# Set the working directory inside the container to /app
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy the package.json and package-lock.json (if available)
|
8 |
-
COPY package
|
9 |
|
10 |
-
# Install
|
11 |
-
RUN npm install
|
12 |
|
13 |
-
# Copy the rest of
|
14 |
COPY . .
|
15 |
|
16 |
-
#
|
17 |
EXPOSE 7860
|
18 |
|
19 |
-
# Command to run
|
20 |
CMD ["node", "server.js"]
|
|
|
1 |
+
# Use the official Node.js 16 image as a parent image
|
2 |
+
FROM node:16
|
3 |
|
4 |
+
# Set the working directory inside the container to /app
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy the package.json and package-lock.json (if available) to /app
|
8 |
+
COPY package*.json ./
|
9 |
|
10 |
+
# Install project dependencies inside the container
|
11 |
+
RUN npm install
|
12 |
|
13 |
+
# Copy the rest of your application's source code from your host to your image filesystem.
|
14 |
COPY . .
|
15 |
|
16 |
+
# Make port 7860 available to the world outside this container
|
17 |
EXPOSE 7860
|
18 |
|
19 |
+
# Command to run your app using Node.js
|
20 |
CMD ["node", "server.js"]
|