I don't know if it applies to the web server, but for the command-line version of youtube-dl, it has a -U option that updates itself. One could create a batch file or shell script that runs that each time, before downloading a video, or do it manually once in a while. Like someone else said, I think the creator updates the app fairly often.
Edit: I had written a post about youtube-dl describing its use a bit, and also a quick look at its code:
It looks like they're installing youtube-dl via apt, from the Ubuntu 16.04 repos (which is what the docker image uses as a base), do even rebuilding wouldn't cut it. I wonder if this will even work out of the box, because YouTube changed something that required youtube-dl to fix a month or two ago.
Edit: I had written a post about youtube-dl describing its use a bit, and also a quick look at its code:
youtube-dl, a YouTube downloader in Python:
https://jugad2.blogspot.com/2013/03/youtube-dl-yourube-downl...
Also check out: pafy - Python API for YouTube:
https://jugad2.blogspot.com/2014/06/pafy-python-api-for-yout...
Edit 2: And this might be of use:
How to download PyCon US 2013 videos for offline viewing using youtube-dl:
https://jugad2.blogspot.com/2013/04/how-to-download-pycon-us...