sanch1tx commited on
Commit
6d837ec
·
verified ·
1 Parent(s): 0391893

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.11-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ #
8
+ # --- Install System Dependencies ---
9
+ # This is the most important step.
10
+ # It installs 'megatools' and 'ffmpeg' (for ffprobe)
11
+ # which the Python script needs to call.
12
+ #
13
+ RUN apt-get update && apt-get install -y \
14
+ megatools \
15
+ ffmpeg \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Copy the requirements file into the container
19
+ COPY requirements.txt .
20
+
21
+ # Install any needed packages specified in requirements.txt
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy the bot script into the container
25
+ COPY main.py .
26
+
27
+ # Command to run the bot when the container launches
28
+ CMD ["python", "main.py"]