Sometimes while browsing the internet you come across a video that is so great that you must have it! YouTube-dl is a command-line application that lets you do just that. It's pretty simple, small, and to the point, so why would it need to be Dockerized?

There are plenty of easy ways to install YTDL directly on your host system, which is exactly what I did on my openmediavault NAS. This made the most sense, download directly to the storage device, and you may very well be able to to run it like this as I had been for a while. However, if you start running into weird errors and stack traces that point to Python 2.7.x, this Docker image may help.

Why not just upgrade to Python 3.x? Well, my NAS is running OMV 4.x Arrakis which is based on Debian 9 Stretch, whose latest supported version is 2.7.x. Now you can run Python 3 alongside, but even here the latest supported version is 3.5.x and I still had issues. My MacOS where YTDL was working runs Python 3.7.x. I could try to force python3 to 3.7.x, but how would this impact the NAS? Honestly I have no idea or interest in finding out, as I really don't need to bork my NAS and all my data.

So, as one does, I Dockerized the app. It's based on the Python's official image and I use the Alpine base to keep the image as small as possible. Ffmpeg is added to handle any muxing. Just clone, build, and run. Check out the repo on GitHub.