Nexchan commited on
Commit
d5fac92
1 Parent(s): 7bb9a78

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -22
Dockerfile CHANGED
@@ -1,29 +1,34 @@
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 gconf-service libasound2 libatk1.0-0 libcups2 libdbus-1-3 libgconf-2-4 libgtk-3-0 libnspr4 libnss3 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxrandr2 libxss1 libxtst6 fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont libappindicator1 libindicator7 libpango-1.0-0 libpangocairo-1.0-0 libx11-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxrandr-dev libxss-dev libxtst-dev ca-certificates fonts-liberation libappindicator3-1 libnss3-dev lsb-release xdg-utils wget && \
7
- rm -rf /var/lib/apt/lists/*
8
 
9
- # Set up the work directory
10
- WORKDIR /app
11
 
12
- # Copy package.json and install npm dependencies
13
- COPY package.json .
14
- RUN npm install -g npm@latest node-gyp
15
- RUN npm install
16
 
17
- # Install Python dependencies
18
- RUN python3 -m venv /venv
19
- ENV PATH="/venv/bin:$PATH"
20
- RUN pip install --no-cache-dir speedtest-cli
21
 
22
- # Copy the rest of the app files
23
- COPY . .
24
 
25
- # Expose the port
26
- EXPOSE 7860
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- # Command to run the app
29
- CMD ["node", "index.js"]
 
1
+ FROM python:latest
 
2
 
3
+ ENV PYTHONUNBUFFERED 1
 
 
 
4
 
5
+ EXPOSE 7860
 
6
 
7
+ RUN apt update
 
 
 
8
 
9
+ RUN apt install curl
 
 
 
10
 
11
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
 
12
 
13
+ RUN apt install nodejs
14
+
15
+ RUN apt install neofetch
16
+
17
+ RUN apt install ffmpeg
18
+
19
+ RUN apt --yes install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0
20
+
21
+ RUN useradd -m -u 1000 user
22
+ USER user
23
+ ENV HOME=/home/user \
24
+ PATH=/home/user/.local/bin:$PATH
25
+
26
+ WORKDIR $HOME/app
27
+
28
+ COPY --chown=user package*.json .
29
+
30
+ RUN npm install
31
+
32
+ COPY --chown=user . .
33
 
34
+ CMD [ "node", "index.js" ]