Tomar commited on
Commit
f7312a6
·
verified ·
1 Parent(s): 3afbff8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official code-server image
2
+ FROM codercom/code-server:latest
3
+
4
+ # Switch to root to install additional packages if needed
5
+ USER root
6
+
7
+ # Optional: Install Python, Node.js, or other tools you need
8
+ RUN apt-get update && apt-get install -y \
9
+ python3 \
10
+ python3-pip \
11
+ git \
12
+ curl
13
+
14
+ # Switch back to the 'coder' user for security
15
+ USER coder
16
+
17
+ # Expose port 7860 (Hugging Face's default port)
18
+ EXPOSE 7860
19
+
20
+ # Start code-server
21
+ # We bind to 0.0.0.0 to allow external access
22
+ # We point the user data directory to /home/coder to ensure permissions are correct
23
+ ENTRYPOINT ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "password", "."]