Can't login when running with persistance
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.
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.
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.