Problem communicating between 2 containers.
I'm fairly new to docker, docker-compose, and Portainer
I've got 2 containers, each in it's own stack. I'm using Portainer to manage the environment. 1stContainer is using it's 1stContainer_default network with an IP network of 172.18.0.0/16 and a an address of 172.18.0.2/32. I want 2ndContainer to communicate with it using 1stContainer_default network but I'm unable to get it working.
I can see in Portainer that 2ndContainer is connected to 1stContainer_default but has no IP. It also does not show as a "Container in network" under Portainer's Network details page.
Here are a few parts of 2ndContainer's docker-compose (Portainer stack):
networks:
1stContainer_default:
external: true
services:
2ndContainer:
container_name: 2ndContainer
networks:
- 1stContainer_default
environment:
- ServerIP=172.18.0.3
Any ideas as to what I'm doing wrong or what to check next?