Search code examples
dockertomcatnetwork-programmingdocker-composewar

Docker can not access external network


I have a docker compose with 3 applications : postgres, pgadmin and war inside tomcat. When I launch the war on container, the application can not access to external urls (others containers running on others machines or on the same machine but in different network).

Thanks


Solution

  • Intercommunication of containers is only possible if they are running withing the same network. One possible solution of your problem is to create another network and connect all your containers with this network.