Skip to content

PostgreSQL image is open to the world #3

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

Closed
itn3rd77 opened this issue Aug 1, 2014 · 3 comments
Closed

PostgreSQL image is open to the world #3

itn3rd77 opened this issue Aug 1, 2014 · 3 comments

Comments

@itn3rd77
Copy link

itn3rd77 commented Aug 1, 2014

Hi,

is there any good reason I am not aware of why this postgres installation should be open to the world by this line inside docker-entrypoint.sh:

host all all 0.0.0.0/0 trust

Isn't it a better way to allow the postgres user to authenticate via password and set a default password once at startup. This way the password can be changed after starting the container via psql.

Best regards

Ingo

@yosifkit
Copy link
Member

yosifkit commented Aug 1, 2014

That is a file in the volume and thus configurable or replaceable by the user. Besides, all containers are inside the NAT and only exposed to external networking with -p on run.

You can also disable icc to prevent all containers from talking to it as well (excepting those connected with --link). https://docs.docker.com/articles/networking/

@tianon
Copy link
Member

tianon commented Aug 1, 2014

Indeed, I'd echo what @yosifkit has said - if you disable inter-container-communication via --icc=false on your daemon, don't expose ports (with either -p or -P), then only --linked containers can connect.

@itn3rd77
Copy link
Author

itn3rd77 commented Aug 5, 2014

Thanks for your comments and opinion on this.

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

3 participants