An open API service indexing awesome lists of open source software.

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

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)