(If I get it right), If I only want PostgreSQL to be accessible from the host machine I should not include a custom network and my docker run command should look like this. docker run -d --publish 127.0.0.1:5433:5432. If I want it to be accessible within the network or even outside, I should remove 127.0.0.1.
(If I get it right), If I only want PostgreSQL to be accessible from the host machine I should not include a custom network and my docker run command should look like this.
docker run -d --publish 127.0.0.1:5433:5432
. If I want it to be accessible within the network or even outside, I should remove127.0.0.1
.Yes, that's correct.