DEV Community

Discussion on: Add a Postgres Database With Docker to Your Project

Collapse
 
zaffja profile image
Zafri Zulkipli

If inside the container, yes localhost is fine. But I don't know how else from host we can connect to container without using IP/port. And since docker will assign random IP address, my preference would always be to tell docker to assign specific IP.