-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
can't connect to host.docker.internal #902
Comments
Does it work if you remove the |
Yes, it works without it but removing it breaks compatibility with other docker setups. Those lines are there in the docker-compose file to make sure the same docker-compose works across environments. For reference: moby/moby#40007 And as mentioned before this was working fine at least up to 0.6.2 (I upgraded this morning from 0.6.2 to 0.6.5 so unsure which version broke this). BTW, awesome work with colima, huge fan here :) |
Yeah, I am not asking you to remove it, I am only trying to confirm if it's only the I suspect it is (docker daemon) configuration related. Thanks for reporting. |
In DDEV we only add that on Linux docker-ce systems, since |
The issue has been found. For whatever reason, the docker daemon is not picking up the Fixing in #904. |
This should be fixed by now. You can verify by installing the development version Thanks. |
Perfect, I can confirm it works now. Amazing work and thanks! @rfay FWIW we always add it because it is basically a NOOP in docker-for-mac and other systems that add it automagically and it adds a consistent behavior across development environments. |
@dbarrosop Does this still work for you in 0.6.7? I'm running into the same issue on my Sonoma 14.2.1 machine by the looks of it:
I have tried rebooting, starting over after a |
Yeah, this seems broken again in 0.6.7 |
Yup, not working for me in 0.6.7 |
Not working with 0.7.0 also |
Can you try the current development version? |
Just checked - works fine. Hope the fix will land in the next colima version |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [abiosoft/colima](https://github.com/abiosoft/colima) | patch | `v0.7.0` -> `v0.7.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>abiosoft/colima (abiosoft/colima)</summary> ### [`v0.7.1`](https://github.com/abiosoft/colima/releases/tag/v0.7.1) [Compare Source](abiosoft/colima@v0.7.0...v0.7.1) #### Highlights This is an incremental release with bug fixes. - Interrupted disk image download will now resume on subsequent `colima start`. - Docker container port mapping to specific host IP addresses is now supported. For more details about v0.70 features, check [v0.70 release notes](https://github.com/abiosoft/colima/releases/tag/v0.7.0). #### Other Fixes - Disk image downloader no longer duplicating downloads. Fixes [#​1098](abiosoft/colima#1098) - Support for binding to host IP address in containers. Fixes [#​492](abiosoft/colima#492) - Ensure proper loading of docker deamon settings on startup. Fixes [#​902](abiosoft/colima#902) - Running multiple Colima profiles with k3s enabled. Fixes [#​1087](abiosoft/colima#1087) #### Commits - k3s: use random port for cluster API by [@​abiosoft](https://github.com/abiosoft) in abiosoft/colima#1088 - k3s: re-use default port for existing instances by [@​abiosoft](https://github.com/abiosoft) in abiosoft/colima#1090 - net: support forwarding to specific host IP addresses by [@​abiosoft](https://github.com/abiosoft) in abiosoft/colima#1091 - core: nested virtualization and other fixes by [@​abiosoft](https://github.com/abiosoft) in abiosoft/colima#1094 - build(deps): bump golang.org/x/term from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in abiosoft/colima#1095 - fix(docker): apply configuration on first boot by [@​milas](https://github.com/milas) in abiosoft/colima#1097 - core: fix downloader duplicating downloads by [@​abiosoft](https://github.com/abiosoft) in abiosoft/colima#1099 - core: update disk images by [@​abiosoft](https://github.com/abiosoft) in abiosoft/colima#1102 **Full Changelog**: abiosoft/colima@v0.7.0...v0.7.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Description
Not sure what changed between 0.6.2 and 0.6.5 but on <=0.6.2 I could add on my docker-compose file:
and then run a service on my laptop and connect from the container directly to it via that name. For instance, if I had on my laptop a service running on
:8080
from the container I could simply docurl http://host.docker.internal:8080
. Now on 0.6.5 I get "connection refused". I noticed thatcurl http://192.168.5.2:8080
works but I don't think hardcoding IPs is a good solution, specially when sharing the docker-compose file with others.Version
colima version 0.6.5
git commit: dev
runtime: docker
arch: aarch64
client: v20.10.25
server: v24.0.7
limactl version 0.18.0
qemu-img version 8.1.2
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers
Operating System
Output of
colima status
Reproduction Steps
nc -l 8080
docker run --rm --add-host=host.docker.internal:host-gateway -it busybox sh -c 'echo asd | nc host.docker.internal 8080 && echo "success" || echo "failed"'
docker run --rm --add-host=host.docker.internal:host-gateway -it busybox sh -c 'echo asd | nc 192.168.5.2 8080 && echo "success" || echo "failed"'
For instance:
On one terminal:
On another:
Expected behaviour
Connecting via
host.docker.internal
should work as it used to on<=0.6.2
Additional context
No response
The text was updated successfully, but these errors were encountered: