GithubHelp home page GithubHelp logo

Comments (10)

jandubois avatar jandubois commented on May 13, 2024 5

I've been meaning to fix this before, but somehow forgot about it. I just filed lima-vm/lima#622 to implement it in lima itself.

from colima.

cpopp avatar cpopp commented on May 13, 2024 2

Yeah, I was/am running v0.8.3

$ limactl --version
limactl version 0.8.3

Just to make sure I went ahead and destroyed my VM (colima delete) and created it from scratch and it works now. So, maybe something with the way I upgraded colima to test it (brew uninstall colima followed by brew install --HEAD colima) left around enough of the old lima VM for the old DNS behavior to be in place.

Seems to work now, so thanks for the assistance!

$ docker run -it --rm bash:4.4 ping host.docker.internal
PING host.docker.internal (192.168.5.2): 56 data bytes
64 bytes from 192.168.5.2: seq=0 ttl=254 time=0.339 ms
...

$ docker run -it --rm bash:4.4 ping host.lima.internal
PING host.lima.internal (192.168.5.2): 56 data bytes
64 bytes from 192.168.5.2: seq=0 ttl=254 time=0.204 ms
...

from colima.

jandubois avatar jandubois commented on May 13, 2024

Lima defines host.lima.internal inside the guest; I think it should be visible to containers as well.

from colima.

zen0wu avatar zen0wu commented on May 13, 2024

Just tested it, and it works, thanks a lot @jandubois! Closing.

from colima.

cpopp avatar cpopp commented on May 13, 2024

Maybe I'm missing something but host.lima.internal doesn't seem to resolve from inside a container with colima. Any insight? Thanks!

$ docker run -it --rm bash:4.4 ping host.lima.internal
ping: bad address 'host.lima.internal'

$ colima version
colima version HEAD-784cec0
git commit: 784cec04dc126b02f5d2697a864282d5d2301afe

runtime: docker
arch: x86_64
client: v20.10.6
server: v20.10.11

I am able to ping host.lima.internal after executing colima ssh, but that's from within the VM and not from a container.

from colima.

abiosoft avatar abiosoft commented on May 13, 2024

This would be part of the next release. It has been fixed properly upstream in Lima thanks to @jandubois.

from colima.

cpopp avatar cpopp commented on May 13, 2024

Should this be available with the latest HEAD? host.lima.internal works, but host.docker.internal does not and #199 (comment) seemed to indicate it would be.

$ colima version
colima version HEAD-5085352
git commit: 5085352f7fdb5f63d6826e76707dc89e117da2c2

$ docker run -it --rm bash:4.4 ping host.docker.internal
ping: bad address 'host.docker.internal'

$ docker run -it --rm bash:4.4 ping host.lima.internal
PING host.lima.internal (192.168.5.2): 56 data bytes
64 bytes from 192.168.5.2: seq=0 ttl=254 time=0.205 ms
...

Based on the discussion in the following thread it seems like colima will need a change for host.docker.internal to be supported: lima-vm/lima#491 (comment)

from colima.

abiosoft avatar abiosoft commented on May 13, 2024

Should this be available with the latest HEAD? host.lima.internal works, but host.docker.internal does not and #199 (comment) seemed to indicate it would be.

@cpopp did you override the DNS settings?

from colima.

cpopp avatar cpopp commented on May 13, 2024

@abiosoft I changed nothing other than starting the colima VM from HEAD and trying the containers. I expected based on your comment in #199 (comment) that host.docker.internal would just work by default, since if the DNS settings have to be overrided then docker.for.mac.host.internal seems like it could be just as easily supported.

If the outcome is host.docker.internal isn't supported by default, that's good to know. (We have a mixture of less experienced users that use a mix of Docker Desktop and colima and we try to make sure some getting started examples for containers work without modification. So we'd either have to provide two examples, or add the extra step to override DNS when using colima).

from colima.

abiosoft avatar abiosoft commented on May 13, 2024

@cpopp is Lima up to date as well? It requires Lima v0.8.3 and above.

limactl --version

from colima.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.