Update Dockerfile
Browse files- 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
RUN useradd -m -u 1000 user
|
| 17 |
|
| 18 |
-
#
|
| 19 |
ENV HOME=/home/user
|
| 20 |
ENV PATH="/home/user/.local/bin:/home/user/.cargo/bin:/home/user/.bun/bin:$PATH"
|
| 21 |
|
| 22 |
-
#
|
| 23 |
RUN chown -R user:user /home/user
|
| 24 |
|
| 25 |
-
#
|
| 26 |
USER user
|
| 27 |
WORKDIR $HOME
|
| 28 |
|
| 29 |
-
#
|
| 30 |
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
| 31 |
|
| 32 |
-
#
|
| 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
|