Spaces:
Paused
Paused
Create Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647FROM ubuntu:22.04
ENV 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"]DockerfileAdded+47