It's solved. I ran netstat -aon
and it showed me 2 processes on the same port, which was also the port I was using for postgres (Like someone suggested). I killed one of these tasks and rebuilt the Docker container, then tried connecting again. It worked this time. Thank you all.