2

I'd like to connect several services with a reverse proxy. But the services can't communicate with each others.

I'm using a compose file for each service.

I'm trying to use the same external bridge (icc=false).

After that, I don't understand how to allow the different communication with the reverse proxy. I've tried links and external_links but it doesn't work. Then, I have read that link will be deprecated...

Sorry for my english, I'm not a native speaker. Thanks, have a good day.

#Example of Test1 compose file:
version: '3'
services:
  app:
    image: nicolaka/netshoot:latest
    tty: true
    restart: always
    networks:
      app-net:
    external_links:
      - test2-app-1
     
networks:
  app-net:
    external:
      name: bridge_icc_false #created with com.docker.network.bridge.enable_icc=false
2
  • I thought link allowed containers to talk w/each other even when icc was set to false. Is there a way to do this?
    – Gary
    Feb 4 at 18:45
  • I thought too. But link option is depracated. This is why I posted this question. I currently do BMitch's answer (see comments below).
    – Guix555
    Feb 6 at 7:43

1 Answer 1

1

icc=false means that inter-container communications are not allowed. If you want to allow inter-container communications, you need to run your containers on a network without this setting.

7
  • So, should I create one bridge per service ? And the reverse proxy is connected to all bridges ?
    – Guix555
    Aug 4, 2022 at 13:30
  • @Guix555 that's a common design with reverse proxies. The other is to have services that don't talk to each other and you trust on the same network.
    – BMitch
    Aug 4, 2022 at 13:44
  • Thanks @BMitch. This will quickly add several bridges. Is there a maximum ?
    – Guix555
    Aug 4, 2022 at 14:05
  • @Guix555 I think most people run out of private subnet ranges before hitting any other limits. I'm not sure there's a hard limit in docker.
    – BMitch
    Aug 4, 2022 at 14:20
  • Docker's default network pools allows for 31 custom bridge networks. The first 15 will be allocated from 172.168.17.0/12 as /16's - allowing ~65535 hosts each. the next 16 are allocated from the 192.168.0.0/16 block as /20's - allowing ~4095 hosts each. If/when swarmmode is activated, overlay networks are then allocated from 10.0.0.0/8 as /24s, allowing for just over 16 million networks, each with ~255 hosts. Sep 30, 2022 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.