How to connect opensearch dashboard when running OpenSearch through source code on local machine

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.9

Describe the issue:
I am currently running Opensearch through source code and the version is 3.0.0. I want to run open search dashboard as well and I just want to use the dashboard to connect to opensearch. But because of the version incompatibility, I am not able to connect to OpenSearch.


Relevant Logs or Screenshots:
When running the dashboard, I am getting the following message:
“This version of OpenSearch Dashboards (v2.9.0) is incompatible with the following OpenSearch nodes in your cluster: v3.0.”

You’ll need to run or build opensearch dashboards v3.0.0.

But the latest version available on docker hub is 2.9.0. How do I run 3.0.0 via docker?