1tbfree commited on
Commit
66f7364
·
verified ·
1 Parent(s): 7236981

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -6
Dockerfile CHANGED
@@ -1,7 +1,15 @@
1
- FROM node:current-bullseye
2
 
3
- # Set the working directory in the container
4
- WORKDIR /vpsfree-45
 
 
 
 
 
 
 
 
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 the app runs on
16
  EXPOSE 7860
17
 
18
- # Run the application as root
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"]