Docker Community Forums

Share and learn in the Docker community.

Docker container visible on 2 publics ip same time

hi

i got 2 internets provider, i got 2 network card eth0 and eth1

here my gateway ISP ip

192.168.1.1 provider 1
192.168.0.1 provider 2

How on docker-compose to use the 2 providers on the same time for my containers ?

For now only provider 1 is use by docker container

here my config for version 2

networks:
   websites:
    ipam:
      config:
        - subnet: 172.20.0.0/16
          ip_range: 172.28.5.0/24

Regards

I thought there are experts on this forum…

It is up to you to present your case - you choose to present it with least amount of details and it didn’t catch attention. Even experts are no magicians.

How to got both internet providers working at same time on my docker container ?

In my docker container, i want to have 2 ethernet card. Each card is configured to one internet provider.

best regards

If it’s about incomming ingress communication (and it’s responses): a published port will always bind the port on 0.0.0.0, thus both interfaces are already used.

It it’s about outgoing egress communication: Docker will always use the defined default gateway of the host .This problem needs to be solved on the host level, not on the container level.