Spaces:
Paused
Paused
Update Dockerfile
Browse files121245673491056121314157817181920910222311122526131415161718192021222324252627282930313233282934# Use node base imageFROM node:latestFROM python: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/*ENV PYTHONUNBUFFERED 1
# Set up the work directoryWORKDIR /appEXPOSE 7860
# Copy package.json and install npm dependenciesCOPY package.json .RUN npm install -g npm@latest node-gypRUN npm installRUN apt update
# Install Python dependenciesRUN python3 -m venv /venvENV PATH="/venv/bin:$PATH"RUN pip install --no-cache-dir speedtest-cliRUN apt install curl
# Copy the rest of the app filesCOPY . .RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
# Expose the portEXPOSE 7860RUN apt install nodejs
RUN apt install neofetch
RUN apt install ffmpeg
RUN apt --yes install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0
RUN useradd -m -u 1000 userUSER userENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME/app
COPY --chown=user package*.json .
RUN npm install
COPY --chown=user . .
# Command to run the appCMD ["node", "index.js"]CMD [ "node", "index.js" ]Dockerfile+27-22