You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new `--add-host` multi flag to the `kl network start` command
which allows configuring additional hosts on the proxy container.
In addition to this, on linux, the `host.docker.internal:172.17.0.1`
host is added to be consistent with macos.
Copy file name to clipboardExpand all lines: README.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ Now you can start the docker network and proxy containers:
95
95
kl network start
96
96
```
97
97
98
-
> [!NOTE]
98
+
> [!NOTE]
99
99
> On linux the host DNS network container's port defaults to binding to `5343`. If you would like to change this you can start the networking components with a different port by running `kl network start --host-dns-port=<custom-port>`. You will then also need to update your `/etc/systemd/resolved.conf` file to match.
100
100
101
101
---
@@ -208,18 +208,16 @@ Below are some common ways of addressing services running in different contexts:
208
208
+`http://example:8080`
209
209
+`http://<container-ip>:8080`
210
210
+ A process running on the host and bound to port `8080` could be addressed as
211
-
+ On macos - `http://host.docker.internal:8080`
211
+
+ On macos and linux*- `http://host.docker.internal:8080`
212
212
+ On linux - `http://172.17.0.1:8080`
213
213
214
-
Because of this host address discrepancy between linux and macos it is highly recommended for **linux based users** to add the following to their `/etc/hosts` file:
215
-
216
-
```bash
217
-
172.17.0.1 host.docker.internal
218
-
```
219
-
220
-
**DO NOT** do this if you are on macos.
221
-
222
-
This is an acceptable compromise to allow for a stable way of addressing the host in module configs that are intended to be consumed by developers on different operating systems.
214
+
> [!NOTE]
215
+
>
216
+
> On **linux\*** docker does not configure the `host.docker.internal` domain which is typically only available on macos when using something like Docker Desktop.
217
+
>
218
+
> To allow for a consistent way of addressing the host that works across all operating systems kl manually adds the `host.docker.internal:172.17.0.1` host to to the proxy container.
219
+
>
220
+
> If you don't want this behaviour you can disable it by running `kl network start --add-host "host.docker.internal:"` (note the empty ip after the ':').
0 commit comments