arcticaurora commited on
Commit
9fedfb0
·
verified ·
1 Parent(s): 8ad7034

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a standard, full-featured base image that's great for development tools
2
+ FROM node:20
3
+
4
+ # --- Install Dependencies (as root) ---
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ curl \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # --- Install Gemini CLI (as root) ---
11
+ RUN npm install -g @google/gemini-cli
12
+
13
+ # --- Install code-server (as root) ---
14
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
15
+
16
+ # --- Prepare the user's workspace (as root) ---
17
+ # Create the home directory and give the 'node' user ownership
18
+ RUN mkdir -p /home/node && chown -R node:node /home/node
19
+
20
+ # Set the working directory for the user
21
+ WORKDIR /home/node
22
+
23
+ # Now, permanently switch to the non-root user
24
+ USER node
25
+
26
+ # Expose the port that code-server will run on
27
+ EXPOSE 7860
28
+
29
+ # --- Final Command (as the 'node' user) ---
30
+ # Start code-server directly. It will run as the 'node' user in the '/home/node' directory.
31
+ CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "."]