Spaces:
Paused
Paused
Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829# Use node base imageFROM node:latest# Update and install necessary dependenciesRUN 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 directoryWORKDIR /app# Copy package.json and install npm dependenciesCOPY package.json .RUN npm install -g npm@latest node-gypRUN npm install# Install Python dependenciesRUN python3 -m venv /venvENV PATH="/venv/bin:$PATH"RUN pip install --no-cache-dir speedtest-cli# Copy the rest of the app filesCOPY . .# Expose the portEXPOSE 7860# Command to run the appCMD ["node", "index.js"]12345678910111213141516171819202122232425262728293031323334FROM python:latestENV PYTHONUNBUFFERED 1EXPOSE 7860RUN apt updateRUN apt install curlRUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -RUN apt install nodejsRUN apt install neofetchRUN apt install ffmpegRUN apt --yes install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0RUN useradd -m -u 1000 userUSER userENV HOME=/home/user \PATH=/home/user/.local/bin:$PATHWORKDIR $HOME/appCOPY --chown=user package*.json .RUN npm installCOPY --chown=user . .CMD [ "node", "index.js" ]
Dockerfile+27-22