shashwatIDR commited on
Commit
8e31a92
·
verified ·
1 Parent(s): 302742c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -13
Dockerfile CHANGED
@@ -1,23 +1,22 @@
1
  FROM codercom/code-server:latest
2
 
3
- # Disable fixuid (optional, avoids warnings)
4
- ENV DISABLE_FIXUID=true
5
 
6
  # Install Python and Node.js
7
- RUN sudo apt-get update && \
8
- sudo apt-get install -y python3 python3-pip curl && \
9
- curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \
10
- sudo apt-get install -y nodejs
11
 
12
- # Set working directory
13
- WORKDIR /home/coder/animesh
14
 
15
- # Disable code-server authentication completely
16
- ENV AUTH=none
17
- ENV PASSWORD=""
18
 
19
  # Expose port for Hugging Face Spaces
20
  EXPOSE 7860
21
 
22
- # Start VS Code server with no authentication
23
- CMD ["code-server", "--auth=none", "--bind-addr", "0.0.0.0:7860", "."]
 
1
  FROM codercom/code-server:latest
2
 
3
+ # Switch to root user
4
+ USER root
5
 
6
  # Install Python and Node.js
7
+ RUN apt-get update && \
8
+ apt-get install -y python3 python3-pip curl && \
9
+ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
10
+ apt-get install -y nodejs
11
 
12
+ # Create the working directory as root
13
+ RUN mkdir -p /animesh
14
 
15
+ # Set the working directory
16
+ WORKDIR /animesh
 
17
 
18
  # Expose port for Hugging Face Spaces
19
  EXPOSE 7860
20
 
21
+ # Run code-server as root without authentication
22
+ CMD ["code-server", "--auth=none", "--bind-addr", "0.0.0.0:7860", "/animesh"]