Nexchan commited on
Commit
5571ca0
·
verified ·
1 Parent(s): 8bb3cd6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +53 -6
Dockerfile CHANGED
@@ -1,26 +1,73 @@
 
1
  FROM node:latest
2
 
 
3
  RUN apt-get update && \
4
  apt-get install -y neofetch ffmpeg curl python3 python3-pip python3-venv build-essential libvips libvips-dev libjpeg-dev libpng-dev && \
5
  rm -rf /var/lib/apt/lists/*
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  WORKDIR /app
8
 
 
9
  COPY package.json .
10
-
11
  RUN npm install -g npm@latest node-gyp
12
-
13
  RUN npm install
14
 
15
- # Create and activate a virtual environment
16
  RUN python3 -m venv /venv
17
  ENV PATH="/venv/bin:$PATH"
18
-
19
- # Install speedtest-cli within the virtual environment
20
  RUN pip install --no-cache-dir speedtest-cli
21
 
 
22
  COPY . .
23
 
 
24
  EXPOSE 7860
25
 
26
- CMD ["node", "index.js"]
 
 
1
+ # Use node base image
2
  FROM node:latest
3
 
4
+ # Update and install necessary dependencies
5
  RUN apt-get update && \
6
  apt-get install -y neofetch ffmpeg curl python3 python3-pip python3-venv build-essential libvips libvips-dev libjpeg-dev libpng-dev && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
+ # Install Puppeteer dependencies
10
+ RUN apt-get update && \
11
+ apt-get install -y \
12
+ gconf-service \
13
+ libasound2 \
14
+ libatk1.0-0 \
15
+ libcups2 \
16
+ libdbus-1-3 \
17
+ libgconf-2-4 \
18
+ libgtk-3-0 \
19
+ libnspr4 \
20
+ libnss3 \
21
+ libx11-xcb1 \
22
+ libxcomposite1 \
23
+ libxcursor1 \
24
+ libxdamage1 \
25
+ libxrandr2 \
26
+ libxss1 \
27
+ libxtst6 \
28
+ fonts-ipafont-gothic \
29
+ fonts-wqy-zenhei \
30
+ fonts-thai-tlwg \
31
+ fonts-kacst \
32
+ ttf-freefont \
33
+ libappindicator1 \
34
+ libindicator7 \
35
+ libpango-1.0-0 \
36
+ libpangocairo-1.0-0 \
37
+ libx11-dev \
38
+ libxcomposite-dev \
39
+ libxcursor-dev \
40
+ libxdamage-dev \
41
+ libxrandr-dev \
42
+ libxss-dev \
43
+ libxtst-dev \
44
+ ca-certificates \
45
+ fonts-liberation \
46
+ libappindicator3-1 \
47
+ libnss3-dev \
48
+ lsb-release \
49
+ xdg-utils \
50
+ wget \
51
+ && rm -rf /var/lib/apt/lists/*
52
+
53
+ # Set up the work directory
54
  WORKDIR /app
55
 
56
+ # Copy package.json and install npm dependencies
57
  COPY package.json .
 
58
  RUN npm install -g npm@latest node-gyp
 
59
  RUN npm install
60
 
61
+ # Install Python dependencies
62
  RUN python3 -m venv /venv
63
  ENV PATH="/venv/bin:$PATH"
 
 
64
  RUN pip install --no-cache-dir speedtest-cli
65
 
66
+ # Copy the rest of the app files
67
  COPY . .
68
 
69
+ # Expose the port
70
  EXPOSE 7860
71
 
72
+ # Command to run the app
73
+ CMD ["node", "index.js"]