File size: 651 Bytes
f7312a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use the official code-server image
FROM codercom/code-server:latest

# Switch to root to install additional packages if needed
USER root

# Optional: Install Python, Node.js, or other tools you need
RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip \
    git \
    curl

# Switch back to the 'coder' user for security
USER coder

# Expose port 7860 (Hugging Face's default port)
EXPOSE 7860

# Start code-server
# We bind to 0.0.0.0 to allow external access
# We point the user data directory to /home/coder to ensure permissions are correct
ENTRYPOINT ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "password", "."]