Update Dockerfile
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
@@ -1,14 +1,20 @@
|
|
1 |
-
# Use Node.js
|
2 |
-
FROM node:
|
3 |
|
4 |
-
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
|
13 |
-
#
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Node.js runtime as a parent image
|
2 |
+
FROM node:18
|
3 |
|
4 |
+
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy the package.json and package-lock.json files
|
8 |
+
COPY package*.json ./
|
9 |
|
10 |
+
# Install the Node.js dependencies
|
11 |
+
RUN npm install
|
12 |
|
13 |
+
# Copy the rest of the application code
|
14 |
+
COPY . .
|
15 |
+
|
16 |
+
# Expose the WebSocket port
|
17 |
+
EXPOSE 6060
|
18 |
+
|
19 |
+
# Start the backend server
|
20 |
+
CMD ["node", "server.js"]
|