It appears you are mixing up some things.
1. Containerisation suites like Docker are used as a means of distributing "pre assembled software" with the necessary configurations/environments so that it's the same across computers. That's really it. Rather than install it bare metal to the computer and having to ensure that all configurations are identical, you just wrap it in a Docker container for distribution.
I can "pre-configure" software in a manner that I know will run the way I set it up on my own development machine with a high degree of predictability. This saves a lot of time. If you've ever developed software and tried to migrate it to other machines, it's a real pain when external dependencies are not included. Microsoft tried to solve this with DLL and .NET packages, and it leads to a lot of unnecessary installations. On *nix, you're expected to set up certain common environments too. There's a reason why things like LAMP/LEMP are mainstays, and how package managers like apt became so popular compared to the old days when we literally had to compile applications each time we install them - the trifecta of configure, make, and make install.
2. Adblock solutions are just that - they block ads, and sometimes malicious sites. It's just that it does it via DNS blacklisting. So it blocks them through blocking their resolved domain names. There are pros and cons to this approach, since it does not matter if the backend IP address changes, since the name is static. However, as explained above, since this is the main way all adblockers work, the ad agencies are smart enough to not use domain names, but rather work around it and use static IP addresses.
Simply, using PiHole, Adguard, web browser blockers or others are only half as effective, and losing effectiveness. Why? Because sites depend on ads to earn money. They WANT to workaround all these common blocks and serve ads anyway, and they will do anything and everything to work around it. Since the ad servers are fairly constant, blocking their IPs or IP ranges is more effective. Simply put, a solution like pfBlocker-NG blocks both the DNS and the IP addresses so is more comprehensive and hence effective. Why bother to install an adblocker that's less effective, and losing effectiveness since all agencies want to push their ads to users at all cost? To further complicate matters, there are other ad serving mechanisms too.
Ads are annoying, but the ones that are rather more malicious are trackers and actual malware. Trackers that compile your user profiles simply by what you surf, what you post, and all can form very realistic collections - and this really isn't what we want to have in the hands of other anonymous entities out there that use it for their own profit. The same subversion mechanisms can be used to distribute trojans and other malware, and are definitely cause for concern.
Hope this helps clarify.