And moreso, if you want to make money just charge money for something. Don't do scumbag stuff like collect emails to sell to marketers. Make something people are willing to pay for, and charge them money for it.
Doesn't Docker have Docker Enterprise or something like that that they charge money for? So the email harvesting is really just in addition to charging money.
This is a socially acceptable reason to collect emails, and it should be openly labeled as "do you want to receive information about Docker products and services?" or the like, like non-annoying companies do.