Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres port exposed outside of Docker #15

Open
bjornpost opened this issue Dec 7, 2014 · 2 comments
Open

Postgres port exposed outside of Docker #15

bjornpost opened this issue Dec 7, 2014 · 2 comments

Comments

@bjornpost
Copy link

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
Copy link
Author

Thoughts, @jeffutter ?

@warrenguy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants