Spaces:
Paused
Paused
Update Dockerfile
Browse files112334565678891011121314151617181991021221112242513142728151617183031192021333422233637382425404142434445464726FROM ubuntu:22.04FROM node:latest
ENV DEBIAN_FRONTEND=noninteractiveRUN apt-get update && \ apt-get install -y neofetch ffmpeg curl python3 python3-pip python3-venv build-essential libvips libvips-dev libjpeg-dev libpng-dev && \ rm -rf /var/lib/apt/lists/*
# Update package listsRUN apt-get update && apt-get upgrade -yWORKDIR /app
# Install necessary packagesRUN apt-get install -y \ curl \ speedtest-cli \ neofetch \ ffmpeg \ imagemagick \ git \ git-lfs \ nodejs \ npm \ software-properties-commonCOPY package.json .
# Install the latest version of Node.js using nRUN npm install -g n && n latestRUN npm install -g npm@latest node-gyp
# Update npm to the latest versionRUN npm install -g npm@latestRUN npm install
# Create a non-root userRUN useradd -m -u 1000 nex# Create and activate a virtual environmentRUN python3 -m venv /venvENV PATH="/venv/bin:$PATH"
# Install code-serverRUN curl -fsSL https://code-server.dev/install.sh | sh# Install speedtest-cli within the virtual environmentRUN pip install --no-cache-dir speedtest-cli
# Switch to non-root userUSER nexCOPY . .
# Set environment variablesENV HOME=/home/nex \ PATH=/home/nex/.local/bin:$PATHEXPOSE 7860
# Set the working directoryWORKDIR $HOME
# Copy the application codeCOPY --chown=nex . $HOME/server
# Start code-serverCMD ["code-server", ".", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]CMD ["node", "index.js"]Dockerfile+16-37