Hi Erik
Thanks for reply.
1. I used the following commands.- (own password)
From the data you posted below, I think the answer is that the "myledger" container can't connect to the postgresql container: it tries to connect to the postgresql container on the 'postgres' host as it is known in the 'myledger' container.
For the quick fix (just for the moment so you can try if this is the problem), you could add a line to the "/etc/hosts" file in the "myledger" container:
172.170.0.2 postgres
You can copy the /etc/hosts file in and out of the container using the 'docker copy' command and edit it on the host. After copying the edited file back in, be sure to "docker stop" and "docker start" the "myledger" container so that any caching of the old /etc/hosts data is reset.
Note that this isn't a long-term solution, because containers can get different IP addresses based on the order in which they're started.
with it, you can add a name for the database container (e.g. 'postgres') to the "myledger" container.
--