Spaces:
Paused
Paused
Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647FROM ubuntu:22.04ENV DEBIAN_FRONTEND=noninteractive# Update package listsRUN apt-get update && apt-get upgrade -y# Install necessary packagesRUN apt-get install -y \curl \speedtest-cli \neofetch \ffmpeg \imagemagick \git \git-lfs \nodejs \npm \software-properties-common# Install the latest version of Node.js using nRUN npm install -g n && n latest# Update npm to the latest versionRUN npm install -g npm@latest# Create a non-root userRUN useradd -m -u 1000 nex# Install code-serverRUN curl -fsSL https://code-server.dev/install.sh | sh# Switch to non-root userUSER nex# Set environment variablesENV HOME=/home/nex \PATH=/home/nex/.local/bin:$PATH# 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"]1234567891011121314151617181920212223242526FROM node:latestRUN 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/*WORKDIR /appCOPY package.json .RUN npm install -g npm@latest node-gypRUN npm install# Create and activate a virtual environmentRUN python3 -m venv /venvENV PATH="/venv/bin:$PATH"# Install speedtest-cli within the virtual environmentRUN pip install --no-cache-dir speedtest-cliCOPY . .EXPOSE 7860CMD ["node", "index.js"]
Dockerfile+16-37