Spaces:
No application file
No application file
Update python vesions and emoved redundant lines
Browse files- Dockerfile +4 -5
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# Dockerfile
|
| 2 |
|
| 3 |
# Use an official Python runtime as a parent image
|
| 4 |
-
FROM python:3.
|
| 5 |
|
| 6 |
# Set environment variables
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE=1
|
|
@@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED=1
|
|
| 9 |
|
| 10 |
# Install system dependencies
|
| 11 |
# - ffmpeg is crucial for yt-dlp for merging formats and segment downloads
|
| 12 |
-
# - git is sometimes needed by yt-dlp for updates or certain extractors (
|
| 13 |
RUN apt-get update && \
|
| 14 |
apt-get install -y --no-install-recommends \
|
| 15 |
ffmpeg \
|
|
@@ -34,17 +34,16 @@ COPY . .
|
|
| 34 |
# COPY telegram_ytdlp_bot.py .
|
| 35 |
# COPY any_other_helper_files_if_any .
|
| 36 |
|
| 37 |
-
# Expose a volume for downloads (
|
| 38 |
# The bot script currently uses "video_downloads/" relative to its execution path.
|
| 39 |
# So, /app/video_downloads/ will be the path inside the container.
|
| 40 |
VOLUME /app/video_downloads
|
| 41 |
|
| 42 |
-
# Expose a volume for cookies (
|
| 43 |
VOLUME /app/cookies
|
| 44 |
|
| 45 |
# Define environment variables for configuration (these will be set at runtime)
|
| 46 |
# You can set defaults here, but it's better to pass them during `docker run`
|
| 47 |
-
ENV TELEGRAM_BOT_TOKEN=""
|
| 48 |
ENV YOUTUBE_COOKIES_FILE_PATH="/app/cookies/youtube.txt"
|
| 49 |
ENV INSTAGRAM_COOKIES_FILE_PATH="/app/cookies/instagram.txt"
|
| 50 |
# The bot script will need to be updated to use these _FILE_PATH variables
|
|
|
|
| 1 |
# Dockerfile
|
| 2 |
|
| 3 |
# Use an official Python runtime as a parent image
|
| 4 |
+
FROM python:3.12-slim
|
| 5 |
|
| 6 |
# Set environment variables
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
| 9 |
|
| 10 |
# Install system dependencies
|
| 11 |
# - ffmpeg is crucial for yt-dlp for merging formats and segment downloads
|
| 12 |
+
# - git is sometimes needed by yt-dlp for updates or certain extractors (good to have)
|
| 13 |
RUN apt-get update && \
|
| 14 |
apt-get install -y --no-install-recommends \
|
| 15 |
ffmpeg \
|
|
|
|
| 34 |
# COPY telegram_ytdlp_bot.py .
|
| 35 |
# COPY any_other_helper_files_if_any .
|
| 36 |
|
| 37 |
+
# Expose a volume for downloads (but good for persisting data)
|
| 38 |
# The bot script currently uses "video_downloads/" relative to its execution path.
|
| 39 |
# So, /app/video_downloads/ will be the path inside the container.
|
| 40 |
VOLUME /app/video_downloads
|
| 41 |
|
| 42 |
+
# Expose a volume for cookies (for easier management)
|
| 43 |
VOLUME /app/cookies
|
| 44 |
|
| 45 |
# Define environment variables for configuration (these will be set at runtime)
|
| 46 |
# You can set defaults here, but it's better to pass them during `docker run`
|
|
|
|
| 47 |
ENV YOUTUBE_COOKIES_FILE_PATH="/app/cookies/youtube.txt"
|
| 48 |
ENV INSTAGRAM_COOKIES_FILE_PATH="/app/cookies/instagram.txt"
|
| 49 |
# The bot script will need to be updated to use these _FILE_PATH variables
|