Update Dockerfile
Browse files- Dockerfile +13 -6
Dockerfile
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
#
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# Copy package.json and package-lock.json
|
7 |
COPY package*.json ./
|
@@ -12,9 +20,8 @@ RUN npm install
|
|
12 |
# Copy the rest of the application code
|
13 |
COPY . .
|
14 |
|
15 |
-
# Expose the port
|
16 |
EXPOSE 7860
|
17 |
|
18 |
-
# Run the application
|
19 |
-
USER root
|
20 |
CMD ["node", "server.js"]
|
|
|
1 |
+
FROM ubuntu:latest
|
2 |
|
3 |
+
# Update package lists and install dependencies
|
4 |
+
RUN apt-get update && \
|
5 |
+
apt-get install -y software-properties-common curl git && \
|
6 |
+
add-apt-repository ppa:deadsnakes/ppa -y
|
7 |
+
|
8 |
+
# Install Node.js
|
9 |
+
RUN apt-get install -y nodejs npm
|
10 |
+
|
11 |
+
# Set the working directory
|
12 |
+
WORKDIR /app
|
13 |
|
14 |
# Copy package.json and package-lock.json
|
15 |
COPY package*.json ./
|
|
|
20 |
# Copy the rest of the application code
|
21 |
COPY . .
|
22 |
|
23 |
+
# Expose the port
|
24 |
EXPOSE 7860
|
25 |
|
26 |
+
# Run the application
|
|
|
27 |
CMD ["node", "server.js"]
|