File size: 954 Bytes
9fedfb0
 
 
18eebd3
 
edda91f
 
 
 
 
1dc13d0
edda91f
9fedfb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18eebd3
9fedfb0
 
 
edda91f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use a standard, full-featured base image that's great for development tools
FROM node:20

# --- 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

# --- 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", "."]