I\'m using this line of code to try to connect(w/ jdbc) to a psql docker container:
Connection conn = DriverManager.getConnection( "jdbc:postgresql://