# Use node base image FROM node:latest # Update and install necessary dependencies RUN apt-get update && \ 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 && \ rm -rf /var/lib/apt/lists/* # Set up the work directory WORKDIR /app # Copy package.json and install npm dependencies COPY package.json . RUN npm install -g npm@latest node-gyp RUN npm install # Install Python dependencies RUN python3 -m venv /venv ENV PATH="/venv/bin:$PATH" RUN pip install --no-cache-dir speedtest-cli # Copy the rest of the app files COPY . . # Expose the port EXPOSE 7860 # Command to run the app CMD ["node", "index.js"]