Of course, sometimes they get mad that this also enables other people to sell premium services on top of the open source core, and sometimes those other people can make more money because they are major incumbents that integrate other offerrings. But that doesn’t mean the startup would have been better or grown faster or sold more of its own services if it hadn’t been open source.
It also doesn’t mean closing-up negates that competition: once the value of the product is proven, the major incumbents also have had proven for them the potential value of funding a fork with its own dedicated team, which can reap the community reach benefits of open source and compete with the relative upstarts now-proprietary offering.
It seems like a lot of us perhaps rushed to discussion before reading this article, which is about Amazon forking ElasticSearch so that an OSS version would remain available.
Honestly, this is a shitty move by Elastic and I’ll be advocating against new uses of it, though /because reasons/, I doubt this will come up for me in the near future. ;)
Actually, you can totally use Apache 2.0 code as your kernel and then make the whole thing a restrictive license. In fact, that's why we're having this discussion right now. Elastic just made their Elasticsearch/Kibana codebases entirely proprietary, even though they rely on Apache 2.0 Lucene as their kernel. Which to be clear is totally fine, I'm just pointing out the obvious.
While this wouldn't prevent a company from using your project, but it would at least force them to pass on any of their changes.
...it would deter them, which is what your original question was asking. Preventing and deterring are two completely different things.