dokku-postgresql-plugin icon indicating copy to clipboard operation
dokku-postgresql-plugin copied to clipboard

Postgres port exposed outside of Docker

Open bjornpost opened this issue 10 years ago • 2 comments
trafficstars

I just discovered that this container binds itself to 0.0.0.0:5432 instead of 127.0.0.1:5432. I'm not sure this is intended behavior; I guess only other containers should be able to connect to the database, not the entire world. The fix is easy, in commands, line 95, change docker run -p 5432:5432 ... to docker run -p 127.0.0.1:5432:5432 ....

bjornpost avatar Dec 07 '14 13:12 bjornpost

Thoughts, @jeffutter ?

bjornpost avatar Jan 14 '15 19:01 bjornpost

If you're using Debian/Ubuntu, you can add:

DOCKER_OPTS="--ip 127.0.0.1"

to your /etc/defaults/docker, which will make this the default behaviour.

warrenguy avatar May 16 '15 20:05 warrenguy