code-server / Dockerfile
arcticaurora's picture
Update Dockerfile
ad8d8e1 verified
# Use a standard, full-featured base image that's great for development tools
FROM node:22
# --- Install Dependencies (as root), including uv from apt ---
# This is much simpler and installs uv system-wide automatically.
RUN apt-get update && apt-get install -y \
git \
curl \
python3 \
python3-pip \
python3.11-venv \
&& rm -rf /var/lib/apt/lists/*
# --- Install Gemini CLI (as root) ---
RUN npm install -g @google/gemini-cli
RUN npm install -g @anthropic-ai/claude-code
RUN npm install -g @musistudio/claude-code-router
# --- Install code-server (as root) ---
RUN curl -fsSL https://code-server.dev/install.sh | sh
# --- Prepare the user's workspace (as root) ---
RUN mkdir -p /home/node && chown -R node:node /home/node
# Set the working directory for the user
WORKDIR /home/node
# Now, permanently switch to the non-root user
USER node
# Expose the port that code-server will run on
EXPOSE 7860
# --- Final Command (as the 'node' user) ---
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "."]