oofnikj / docker-openwrt

OpenWrt running in Docker
GNU General Public License v2.0
310 stars 63 forks source link

Other containers cannot access LAN #27

Closed Flamingi closed 3 years ago

Flamingi commented 3 years ago

I have installed OpenWrt in Docker on Ubuntu, it's working fine and as expected. I have used the default configuration with one macvlan interface for WAN and a bridge for LAN. My Ubuntu host can be reached with 192.168.1.1, while OpenWrt has the IP 192.168.1.2. Now I want to run other containers using the standard bridge interface (i.e. docker0) and I have observed the following behavior:

Is this expected behavior? How do I fix it?

hllhll commented 3 years ago
  • If I connect the container to the bridge network created by OpenWrt I can access my LAN, but on next boot OpenWrt cannot start as the other container takes the network first and then it is already in use.

I Had the same issue, I ended up running my docker-compose YAML file after "ready" instead of on boot.

Flamingi commented 3 years ago

I Had the same issue, I ended up running my docker-compose YAML file after "ready" instead of on boot.

This fixed it, thank you very much.