-
Notifications
You must be signed in to change notification settings - Fork 21
docs: add Docker Desktop on macOS solution #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -531,6 +531,21 @@ NETWORK_DIR=local-devnet ./spin-node.sh --node all --generateGenesis --forceKeyG | |||||||
| ./generate-genesis.sh local-devnet/genesis --forceKeyGen | ||||||||
| ``` | ||||||||
|
|
||||||||
| --- | ||||||||
|
|
||||||||
| **Problem**: Grafana dashboards show "No data" | ||||||||
|
|
||||||||
| On macOS, this is typically caused by Docker's **host network mode** (`--network host`) not working out of the box. lean-quickstart uses host networking so Prometheus can scrape node metrics endpoints on `localhost`. Without host networking enabled in Docker Desktop, Prometheus cannot reach the node metrics ports, resulting in empty dashboards. | ||||||||
|
|
||||||||
| **Solution**: Enable the "Enable host networking" option in Docker Desktop: | ||||||||
|
|
||||||||
| 1. Open **Docker Desktop** → **Settings** (gear icon) | ||||||||
| 2. Go to **Resources** → **Network** | ||||||||
| 3. Enable **"Enable host networking"** | ||||||||
| 4. Click **Apply & Restart** | ||||||||
|
|
||||||||
|
||||||||
| After Docker Desktop finishes restarting, restart your devnet with `spin-node.sh` (for example, `NETWORK_DIR=local-devnet ./spin-node.sh --node all`) so the new host networking setting is applied to your containers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The explanation states that "lean-quickstart uses host networking so Prometheus can scrape node metrics endpoints on
localhost", but this is not quite accurate. Looking at the Prometheus configuration generation in generate-prometheus-config.sh (line 50), Prometheus actually scrapes usinghost.docker.internal:${port}, notlocalhost:${port}. The Prometheus container is configured withextra_hosts: - "host.docker.internal:host-gateway"to resolve this hostname. Consider revising the explanation to be more precise about the networking mechanism.