I have two machines: machine-A and machine-B. Both are on different networks. I create a docker container on machine-A using docker-compose.yml and run litecoind process within it on port 12345. I have forwarded port 12345 to the port 80 of the host machine-A.
version: '3'
services:
  node1:
    build: .
    cap_add:
      - ALL
    command: litecoind -regtest -server -rpcuser=rpc -rpcpassword=x -rpcport=10340  --datadir=/root/litecoind-simnet/ -port=12345
    networks:
      vpcbr:
        ipv4_address: 10.9.0.11
    ports:
      - 80:12345
networks:
  vpcbr:
    driver: bridge
    ipam:
     config:
       - subnet: 10.9.0.0/16
Now on machine-B, I can directly connect to the above process with -addnode option of litecoin and can see the blockchains syncing.
Problem arises when I create a container on machine-B and try to connect to the same above process with -addnode by using the docker-compose.yml file on machine-B. In this case, the litecoind process remains invisible and the blockchains do not sync.
version: '3'
services:
  node1:
    build: .
    cap_add:
      - ALL
    command: litecoind -regtest -addnode=<x.x.x.x:80> -rpcuser=rpc -rpcpassword=x -rpcport=10340  --datadir=/root/litecoind-simnet/ -port=12345
    networks:
      vpcbr:
        ipv4_address: 10.8.0.11
    ports:
      - 90:12345
networks:
  vpcbr:
    driver: bridge
    ipam:
     config:
       - subnet: 10.8.0.0/16
I want the above two separate containers on two separate remote machines to communicate with each other. What am I missing? Help please. Thanks.
 
    