helmi03 / docker-postgis

https://index.docker.io/u/helmi03/postgis/
31 stars 40 forks source link

Can't login when running with persistance #3

Open Grovespaz opened 10 years ago

Grovespaz commented 10 years ago

I'm not sure if this is just me not understanding the tooling well enough yet, or something you could possibly fix in the dockerfile.

When I run the container with the sample command you provided: docker run -d -v $HOME/postgres_data:/var/lib/postgresql postgis:2.1

I find that I can't login with the credentials, whilst running the container without persistance allows me to login normally.

evdoks commented 10 years ago

Have the same problem - cannot login to the database with docker/docker if the container mounts the database directory as a volume to persist the data.

evdoks commented 10 years ago

The reason for that are missing definitions for $USERNAME and $PASS variables in start.sh script. Once they are set to USERNAME=docker and PASS=docker you can log into the database as usual.

happyman commented 9 years ago

first time run: sudo docker run -e USERNAME=docker -e PASS=docker -d -v /home/postgres_data/:/var/lib/postgresql -t -p 5432:5432 helmi03/docker-postgis, let start.sh get the variables. the 2nd time does matter.