FROM codercom/code-server:latest USER root # Install system tools and dev environment RUN apt-get update && \ apt-get install -y \ python3-pip \ python3-venv \ python3-dev \ build-essential \ git \ curl \ wget \ unzip \ nano \ zip \ ca-certificates \ net-tools \ xz-utils \ openssh-client \ lsb-release \ software-properties-common && \ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \ apt-get install -y nodejs && \ npm install -g npm yarn && \ apt-get clean && rm -rf /var/lib/apt/lists/* # Install Python libraries RUN pip3 install --break-system-packages --no-cache-dir --upgrade pip setuptools wheel && \ pip3 install --break-system-packages ipython virtualenv jupyter yt-dlp # Setup workspace RUN mkdir -p /home/coder/project && chown -R coder:coder /home/coder/project # Switch back to non-root user USER coder ENV PORT=7860 ENV HOME=/home/coder # Delay config writing until container run using entrypoint script COPY --chown=coder:coder entrypoint.sh /home/coder/entrypoint.sh RUN chmod +x /home/coder/entrypoint.sh WORKDIR /home/coder/project EXPOSE 7860 CMD ["/home/coder/entrypoint.sh"]