Docker on OpenWRT - changing host ip for docker network bridge or container

Hi all - I'm pretty sure this is definitely a question for the rubber duck but apparently mine has gone out to grab milk at the market.

I've set up docker on my router and I can get various containers going with no issue. The problem is that I want to bridge my docker network to a different host ip address instead of my actual host. For the life of me, I can't get this going at all. I figured that I could enter my destination host IP within the publish field in dockerman but that appears to be ignored and simply fails out.

I was reading that this can be accomplished with docker compose, but attempts with docker compose go no where. The errors I see with compose is ports are already in use (not sure how this is the case when the ip address has not been leased or assigned) or fails to bind to ip address.

No different than on ubuntu

I actually read that thread earlier on and wasn't successful on my attempt. Turns out when adding an IP address to the LAN interface, just the ip address didn't work for me. I have to set an CIDR notation to the ip address limiting it to the one ( x.x.x.x**/32**)
Not sure why that's the case in my scenario, but at least it's working now. Now I've got other things I've gotta figure out but don't have to be included on this thread.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.