Docker create two bridges that corrupts my internet access

前端 未结 3 2317
难免孤独
难免孤独 2021-02-20 14:14

I\'m facing a pretty strange issue:

Here is my config:

  • docker 17-ce
  • ubuntu 16.04.

I work from two differents places with differ

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-20 15:13

    I manage to solve this issue after reading this:

    https://success.docker.com/Architecture/Docker_Reference_Architecture%3A_Designing_Scalable%2C_Portable_Docker_Container_Networks

    The second docker bridge br-1a0208f108d9 was created by docker because i was using a docker-compose file which involve the creation of an other custom network.

    This network was using a fixed ip range:

    networks:
      my_network:
        driver: bridge
        ipam:
          config:
          - subnet: 172.16.0.0/16
            gateway: 172.16.0.1
    
    • At my home, the physical wifi network adapter was automaticly assigned using DHCP the address 192.168.0.X.
    • But in the other place, the same wifi adapter get the address 172.16.0.x

    Which collide with the custom docker network.

    The solution was simply to change the IP of the custom docker network.

提交回复
热议问题