youtube-dl is a command-line program to download videos from YouTube.com and other video sites.
- Github page : https://github.com/gissehel/docker-youtube-dl
- Docker hub page : https://hub.docker.com/r/gissehel/youtube-dl/
Based on https://github.com/wernight/docker-youtube-dl. (https://hub.docker.com/r/wernight/youtube-dl/)
$ docker run --rm --user $(id -u):$(id -g) -v $(pwd):/downloads ghcr.io/gissehel/youtube-dl <video_url>
--user $(id -u):$(id -g)
is to run as your current user, and notroot
.-v $(pwd):/downloads
is to store downloaded files in the current working directory.<video_url>
is the ID of a YouTube video or other arguments to pass toyoutube-dl
.
Note: The entrypoint is set to youtube-dl
, so do not put youtube-dl
again as argument.
ydl() {
docker run --rm --user $(id -u):$(id -g) -v $(pwd):/downloads ghcr.io/gissehel/youtube-dl "${@}"
}
- Small: Built based on official Alpine Linux.
- Simple: One command and you should be ready to go. All documented here.
- Secure: Runs as any user.