Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Docker Support with All External Binaries
Summary
This PR adds Docker support for gamdl, providing a containerized environment with all required and optional external binaries pre-installed. Users can run gamdl without needing to manually install FFmpeg, mp4decrypt, MP4Box, or N_m3u8DL-RE on their system.
Changes
New Files
Dockerfile: Multi-stage build that creates an optimized image with all dependencies.dockerignore: Excludes unnecessary files from the Docker build contextModified Files
README.md: Added Docker usage documentation with examplesTechnical Details
Dockerfile Architecture
The Dockerfile uses a 4-stage multi-stage build for optimal image size:
builderpython:3.11-slimbento4-builderpython:3.11-slimgpac-builderpython:3.11-slimpython:3.11-slimIncluded Binaries
Security Considerations
--no-install-recommendsto minimize attack surfacepython:3.11-slimbase for smaller footprint.dockerignoreprevents sensitive files (cookies, .env) from being copied into the build contextUsage Examples
Basic usage:
With N_m3u8DL-RE downloader:
docker run --rm \ -v ./cookies.txt:/app/cookies.txt:ro \ -v ./music:/app/music \ gamdl --cookies-path /app/cookies.txt --output-path /app/music --download-mode nm3u8dlre "https://music.apple.com/..."With config persistence:
docker run --rm \ -v /path/to/cookies.txt:/app/cookies.txt:ro \ -v /path/to/output:/app/music \ -v /path/to/config:/root/.gamdl \ gamdl --cookies-path /app/cookies.txt --output-path /app/music "https://music.apple.com/..."Test Results
docker build -t gamdl .docker build -t gamdl .docker run --rm gamdl --help--download-mode nm3u8dlre--remux-mode mp4box