Skip to content

Lima binds only on IPv4 #1540

Open
@heyvito

Description

@heyvito

Description

Hey there, folks!
I just stumbled on a rather odd thing, and at the time I wasn't sure what was happening:

I’m using Colima, and for some reason, after starting a container through docker compose run --rm -p 3000:3000 service-name, another process managed to bind to the same port.

Initially, I thought the process was incorrectly indicating that it was listening on the port the container allocated, but no. If I tried to curl to port 3000, I hit the container, but my browser (tested with Arc and Safari) hits the other process!

Upon further inspection (thanks to Colima creator), I understood Lima's port-forwarding mechanism was only binding to the host's IPv4 address, leaving the IPv6 address free, and so allowing other applications to bind to this other address.
After finding this I thought it was just a matter of allowing IPv4 bindings to also use the IPv6 address, but I guess I'm wrong.

PS: I'm totally willing to contribute with code, if it's okay; I woudl need some directions, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions