Tokipo commited on
Commit
ab0b79d
·
verified ·
1 Parent(s): effc3d9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-slim
2
+
3
+ # Install Python and required packages
4
+ RUN apt-get update && apt-get install -y \
5
+ python3 \
6
+ python3-pip \
7
+ python3-venv \
8
+ curl \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /app
12
+
13
+ # Create package.json for Node dependencies
14
+ RUN echo '{"name":"mineflayer-bot","version":"1.0.0","dependencies":{"mineflayer":"^4.14.0","express":"^4.18.2","socket.io":"^4.5.4","axios":"^1.6.0"}}' > package.json
15
+
16
+ # Install Node dependencies
17
+ RUN npm install
18
+
19
+ # Install Python dependencies
20
+ RUN pip3 install --no-cache-dir flask flask-cors requests pandas
21
+
22
+ # Copy the main application
23
+ COPY app.py .
24
+
25
+ # Expose port for Hugging Face Spaces
26
+ EXPOSE 7860
27
+
28
+ # Run the application
29
+ CMD ["python3", "app.py"]