If we look at how Solr is defined in the docker-compose.yml
file, we'll see that the port is set to map to :8984
on your local machine to :8983
on the running Solr container.
In my case, I have multiple Solr instances running on my machine from previously installed Sitecore instances.
Whenever I installed new Solr instances, avoiding using ports that were already being used for existing Solr instances was a prerequisite (eg. if I have one version of Solr running on 8983, for the new version of Solr I'd use 8984. If I needed another version of Solr, that one would use 8985, etc). The same applies in this case.
Because the default Sitecore 10 Docker Compose is trying to use port 8984, it must be available.
Solution: Check if there are multiple instances of solr running and stop instance running on the default port or change port number in docker-compose.yml
Hope it helps!