FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y \ curl wget git build-essential nodejs npm \ && rm -rf /var/lib/apt/lists/* RUN curl -fsSL https://code-server.dev/install.sh | sh # Set HOME to /root so code-server doesn't try /.config ENV HOME=/root # Pre-create config dirs RUN mkdir -p /root/.config/code-server \ /root/.local/share/code-server \ /root/.cache/code-server WORKDIR /workspace RUN mkdir -p /workspace EXPOSE 7860 CMD ["code-server", \ "--user-data-dir", "/root/.config/code-server", \ "--bind-addr", "0.0.0.0:7860", \ "--auth", "none", \ "--disable-telemetry", \ "/workspace"]