Painted-Fox / docker-postgresql

A dockerfile that produces a docker image that runs postgresql.
MIT License
72 stars 57 forks source link

Connection refused #21

Closed djholt closed 10 years ago

djholt commented 10 years ago

If I try to run a container using the latest image, I'm unable to connect. The connection is always refused. Any ideas? I'm doing something like this:

$ docker run -d -p 5432:5432 --name postgres -e DB=test -e USER=super -e PASS=secret paintedfox/postgresql

$ psql -h localhost -U super

tpires commented 10 years ago

+1

I'm having the same issue, on Ubuntu 14.04 LTS x86_64.

Painted-Fox commented 10 years ago

I think I know what's going on. I've seen this with my MariaDB docker image. Essentially sed was not having an effect on the configuration file after the configuration directory was included in the VOLUME statement. This meant that the container would bind to 127.0.0.1 (the default) and not accept any incoming connections from other sources.

I'll be able to investigate further tonight.

Painted-Fox commented 10 years ago

I think I've solved it. Could you pull the latest image and give this a try again? The latest image id is e240f513e4c3.

fox@Squeak:~/proj/docker-postgresql$ docker images paintedfox/postgresql
REPOSITORY              TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
paintedfox/postgresql   latest              e240f513e4c3        22 minutes ago      527.9 MB
tpires commented 10 years ago

Just tested now and it's working. Thanks!

Painted-Fox commented 10 years ago

Glad to hear it! Thank you very much for your help!

djholt commented 10 years ago

Thanks! Works for me now, too.

Painted-Fox commented 10 years ago

Thanks for verifying, @djholtj!