https://github.com/httpjamesm/yt-dlp-docker
Sandboxed yt-dlp in Docker
https://github.com/httpjamesm/yt-dlp-docker
Last synced: 3 days ago
JSON representation
Sandboxed yt-dlp in Docker
- Host: GitHub
- URL: https://github.com/httpjamesm/yt-dlp-docker
- Owner: httpjamesm
- License: mit
- Created: 2026-03-25T02:14:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-03-25T02:15:07.000Z (3 months ago)
- Last Synced: 2026-03-26T08:42:00.667Z (3 months ago)
- Language: Dockerfile
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yt-dlp Docker
Lightweight, sandboxed yt-dlp container based on Alpine Linux.
## Build
```sh
docker build -t yt-dlp .
```
## Usage
Downloads go to your current directory:
```sh
docker run --rm -v "$(pwd):/downloads" yt-dlp
```
Pass any yt-dlp flags as normal:
```sh
# Download best audio as mp3
docker run --rm -v "$(pwd):/downloads" yt-dlp -x --audio-format mp3
# List available formats
docker run --rm yt-dlp -F
# Download specific format
docker run --rm -v "$(pwd):/downloads" yt-dlp -f bestvideo+bestaudio
```
## Optional: shell alias
Add to your shell config (`~/.bashrc`, `~/.zshrc`, `config.fish`, etc.):
```sh
# bash/zsh
alias yt-dlp='docker run --rm -v "$(pwd):/downloads" yt-dlp'
# fish
alias yt-dlp='docker run --rm -v (pwd):/downloads yt-dlp'
```
Then use it exactly like the native tool:
```sh
yt-dlp
```
## Security
- Runs as non-root user (`ytdlp`, uid 1000)
- No network access beyond what Docker allows
- Only `/downloads` is mounted — no access to the rest of your filesystem
- Read-only root filesystem compatible (add `--read-only --tmpfs /tmp` if desired)