Tomar commited on
Create Dockerfile
Browse files- 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", "."]
|