You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
h4ck3rm1k3
pushed a commit
to h4ck3rm1k3/docker-postgis
that referenced
this issue
Nov 2, 2014
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.
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.
The text was updated successfully, but these errors were encountered: