OH! thank you!.
I guess I fell in to a blind spot because I was trying to test from within the container, that is running on the same VPS as the redis service.
I enabled UFW for all my local IP address range 192.168.0.0/16 to port 6379 but apparently it’s insufficient since the docker is accessing my 192.168 network IP from different ip address.
i found these with
ip address | grep inet
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
inet 172.18.0.1/16 brd 172.18.255.255 scope global br-b94231dd5ca5
inet 172.21.0.1/16 brd 172.21.255.255 scope global docker_gwbridge
and I added all 3 IP ranges to the ufw table and it appears to be working even if the docker container is on the same server as my redis.
I am able to use redis-cli within the docker container now, it seems.
Please correct me if I am doing anything that is insufficient. I m afraid of hiccups later on.