Create postgres image changing the port

Hi, can someone helpme, I need a postgres image but the server has to be running in other port, so how can i create a postgres image changing the port?