dokku-postgresql-plugin
dokku-postgresql-plugin copied to clipboard
Postgres port exposed outside of Docker
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 ....
Thoughts, @jeffutter ?
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.