The --add-host=host.docker.internal:host-gateway solution does not work on Rancher Desktop with Moby docker runtime.
Can I map host.docker.internal or host.rancher-desktop.internal to host-gateway with the flag --add-host?
A: No, the special value host-gateway is specific to Docker Desktop and is not yet supported in Rancher Desktop. However, you can access services running on the host machine from within a container using host.docker.internal or host.rancher-desktop.internal without passing the --add-host flag.
Relates: #281
The Moby docs for --add-host also mention that host-gateway is (only) a Docker Desktop thing:
Docker Desktop automatically resolves this hostname
Given that there are several ways to install docker locally, including WSL, Colima, Podman, and Rancher Desktop (Moby), I think the documentation may need further revision.
By the way, even without adding host-gateway, I am currently receiving an error when trying to add a deployment:
error when calling 'http://host.docker.internal:9080/': client error (SendRequest), http2 error
restate.error.code: META0003
This is happening with Rancher Desktop (moby) on both Mac and Windows.
The
--add-host=host.docker.internal:host-gatewaysolution does not work on Rancher Desktop with Moby docker runtime.Can I map host.docker.internal or host.rancher-desktop.internal to host-gateway with the flag --add-host?
Relates: #281
The Moby docs for
--add-hostalso mention thathost-gatewayis (only) a Docker Desktop thing:Given that there are several ways to install docker locally, including WSL, Colima, Podman, and Rancher Desktop (Moby), I think the documentation may need further revision.
By the way, even without adding
host-gateway, I am currently receiving an error when trying to add a deployment:This is happening with Rancher Desktop (moby) on both Mac and Windows.