Skip to content
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

Suuport adding extra IP addresses #1118

Open
dmarkey opened this issue Aug 22, 2024 · 1 comment
Open

Suuport adding extra IP addresses #1118

dmarkey opened this issue Aug 22, 2024 · 1 comment

Comments

@dmarkey
Copy link

dmarkey commented Aug 22, 2024

Description

Hey, thanks for colima!

We have a private IP that we use for local development thats not 127.0.0.1. So I we have to fiddle with adding IP aliases on loopback like this on the host:

    if [ $(uname) == "Darwin" ] ; then
        sudo ifconfig lo0 alias 172.16.1.1  255.255.255.255
        sudo ifconfig lo0  alias 172.16.1.200  255.255.255.255
    fi

    if [ $(uname) == "Linux" ] ; then
        if ! ip addr show to 172.16.1.1 | grep UP ; then
            sudo ip addr add 172.16.1.1/24 dev lo
            sudo ip addr add 172.16.1.200/24 dev lo
        fi
    fi
}

Would be great if this could be built in.

@abiosoft
Copy link
Owner

If you're on version v0.7.3, you can start Colima with --network-host-addresses and you'd be able to use those addresses for port forwarding.

docker run --rm -it -p 172.16.1.200:80:80 caddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants