I’m pretty new to Docker so I might use terms not correctly – and so didn’t use Google with the right words… Please excuse!
I have several Docker containers for home automation that are all being configured with a docker-compose.yml.
Internally they all communicate via the virtual network (172.xxx.xxx.xxx) that Docker creates through the yml file.
networks: homeautomation-network: driver: bridge
Now I want one specific container to be also connected to the network my host is in (192.168.xxx.xxx/24).
With this config it communicates internally:
iobroker: restart: always image: buanet/iobroker:latest container_name: iobroker hostname: iobroker ports: - "8081:8081" networks: - homeautomation-network volumes: - ./iobroker:/opt/iobroker
What would I need to change, that this container can reach both networks, the virtual and the "real" one?
Source: Docker Questions