Pepguy commited on
Commit
679f542
·
verified ·
1 Parent(s): 5fbbb26

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -6
Dockerfile CHANGED
@@ -12,24 +12,29 @@ RUN apt-get update && apt-get install -y \
12
  # 2. Install VS Code Server (code-server) as root
13
  RUN curl -fsSL https://code-server.dev/install.sh | sh
14
 
15
- # 3. Create the Hugging Face user (UID 1000)
 
 
 
 
 
16
  RUN useradd -m -u 1000 user
17
 
18
- # 4. Set up environment variables
19
  ENV HOME=/home/user
20
  ENV PATH="/home/user/.local/bin:/home/user/.cargo/bin:/home/user/.bun/bin:$PATH"
21
 
22
- # 5. CRITICAL FIX: Transfer ownership of the home directory from root to user
23
  RUN chown -R user:user /home/user
24
 
25
- # 6. Switch to the non-root user
26
  USER user
27
  WORKDIR $HOME
28
 
29
- # 7. Install Rust (Will now succeed because permissions are fixed)
30
  RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
31
 
32
- # 8. Install Bun
33
  RUN curl -fsSL https://bun.sh/install | bash
34
 
35
  # Expose port
 
12
  # 2. Install VS Code Server (code-server) as root
13
  RUN curl -fsSL https://code-server.dev/install.sh | sh
14
 
15
+ # 3. INSTALL NODE.JS (v20) via NodeSource
16
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
17
+ && apt-get install -y nodejs \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # 4. Create the Hugging Face user (UID 1000)
21
  RUN useradd -m -u 1000 user
22
 
23
+ # 5. Set up environment variables
24
  ENV HOME=/home/user
25
  ENV PATH="/home/user/.local/bin:/home/user/.cargo/bin:/home/user/.bun/bin:$PATH"
26
 
27
+ # 6. Transfer ownership of the home directory from root to user
28
  RUN chown -R user:user /home/user
29
 
30
+ # 7. Switch to the non-root user
31
  USER user
32
  WORKDIR $HOME
33
 
34
+ # 8. Install Rust
35
  RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
36
 
37
+ # 9. Install Bun
38
  RUN curl -fsSL https://bun.sh/install | bash
39
 
40
  # Expose port