Update Dockerfile
Browse files- Dockerfile +15 -4
Dockerfile
CHANGED
@@ -1,7 +1,18 @@
|
|
1 |
-
|
|
|
|
|
|
|
2 |
WORKDIR /app
|
|
|
|
|
3 |
COPY package*.json ./
|
4 |
RUN npm install
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Node.js image
|
2 |
+
FROM node:18
|
3 |
+
|
4 |
+
# Set working directory inside the container
|
5 |
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy package.json and install dependencies
|
8 |
COPY package*.json ./
|
9 |
RUN npm install
|
10 |
+
|
11 |
+
# Copy the rest of the app code
|
12 |
+
COPY . .
|
13 |
+
|
14 |
+
# Expose the port
|
15 |
+
EXPOSE 8080
|
16 |
+
|
17 |
+
# Run the app
|
18 |
+
CMD ["npm", "start"]
|