This is driving me nuts.
I am using rootless docker.
I have a very simple container. All it does is try to connect to a postgresql database and do a simple select.
This simple application works flawlessly outside of a container.
Inside the container it complains about unable to connect.
docker0 interface has ip 172.17.0.1 and that is where I try to connect to from the container.
Simple bridged network.
netstat shows me that postgres is indeed listening on the 172.17.0.1 interface and accepts the 172.17.0.0/16 network
firewall shows that forwarding is allowed.
firewall has been configured to allow all traffic from 172.17.0.0/16
kernel forwarding is on
still no joy. postgresql logs connection attempts but shows nothing when running the container.
running another container and doing a shell inside the container and installing the postgresql-client also says
error: could not connect to server: Connection refused
telnet to 172.17.0.1 5432 gives no connection.
What am I doing wrong or not seeing?
Any and all hints and help is greatly appreciated.