Spaces:
Paused
Paused
Update Dockerfile
Browse files1234567897891011121314151617181920212223242526272829303132333435363738394027414243444546314748495051523653# Use the latest Python image as the base imageFROM python:latest
# Set environment variablesENV PYTHONUNBUFFERED 1
# Expose the port that the server will run onEXPOSE 7860
RUN apt update
RUN apt upgrade -y# Update the package list and upgrade existing packagesRUN apt update && apt upgrade -y
# Install required packagesRUN apt install curl -y
# Add NodeSource APT repository for Node 18.xRUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
# Install Node.js and npmRUN apt install nodejs -y
# Install NeofetchRUN apt install neofetch -y
# Install FFmpegRUN apt install ffmpeg -y
# Install additional dependencies for PuppeteerRUN apt --yes install libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libasound2 libpangocairo-1.0-0 libxss1 libgtk-3-0
# Install ImageMagickRUN apt install imagemagick -y
# Create a non-root user and switch to itRUN useradd -m -u 1000 userUSER user
# Set environment variables for the userENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH
# Set the working directoryWORKDIR $HOME/app
# Copy package.json and package-lock.json files and install dependenciesCOPY --chown=user package*.json .
RUN npm install
# Copy the rest of the application codeCOPY --chown=user . .
# Start the applicationCMD [ "node", "server.js" ]CMD ["node", "index.js"]Dockerfile+23-6