How to configure custom docker compose network

With the help of the following links:

I got it to work with the following:

  1. add a custom network to my docker-compose.yml file. They key is com.docker.network.bridge.name: docker1 (name it whatever you want i suppose):
networks:
  mxi_default:
    name: mxi_default
    driver: bridge
    driver_opts:
      com.docker.network.bridge.name: docker1
  1. add an interface in luci, covering the device1 specified in com.docker.network.bridge.name: docker1 from docker-compose.yml:

  2. add the new interface to docker firewall zone: