Check out this blog post:
Data is replicated from master to standbys and followers using Postgres streaming replication
Standbys expose port 5432 for replication to followers after the standby is promoted, not for replicating from the primary. When container ports are exposed via docker ... --publish
it is implied that they are open for inbound connections.
Best regards,
Samir