docker-postgis icon indicating copy to clipboard operation
docker-postgis copied to clipboard

Can't login when running with persistance

Open Grovespaz opened this issue 11 years ago • 3 comments

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.

Grovespaz avatar Mar 20 '14 15:03 Grovespaz

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 avatar Apr 26 '14 22:04 evdoks

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.

evdoks avatar Apr 26 '14 22:04 evdoks

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.

happyman avatar Nov 20 '14 07:11 happyman