This is a PostGIS image suitable for development databases. The real strength of this image is external volume support. If you don't need that (i.e. you're using boot2docker), you should use a simpler PostGIS image.
Features:
Compromises:
Login with the username docker and no password.
Based of the names and examples established in the makefile and using postdoc on a Linux box.
docker run --detach --name postgis -v ~/volumes/postgis:/data -p 5432:5432 crccheck/postgis
export DATABASE_URL=postgis://[email protected]:5432/states
Locally:
# "states" and connection args were set above in DATABASE_URL
phd createdb
Using this image as a utility container:
docker run --rm --name postgis-debug --link postgis:postgis -i -t \
crccheck/postgis \
createdb -U docker -h postgis -p 5432 states
psqlLocally:
# "states" and connection args were set above in DATABASE_URL
phd psql
Using this image as a utility container:
docker run --rm --name postgis-debug --link postgis:postgis -i -t \
crccheck/postgis \
psql -U docker -h postgis -p 5432
There are two and a half ways to view logs:
Tail the logfile locally using the external volume:
$ tail -f ~/volumes/postgis/logs/postgresql.log
Tail the logfile in a utility container using the volume:
$ docker run --rm --name postgis-debug --volumes-from postgis -i -t \
ubuntu tail -f /data/logs/postgresql.log
Attach to the running container (I don't think this currently works):
docker attach --sig-proxy=false postgis
You may want to stop the image to free up resources:
docker stop postgis
You can restart the container after you stopped it (or after a reboot):
docker start postgis
Using pg_dump locally:
phd pd_dump -Fc > states.dump
And using a helper container:
docker run --rm --name postgis-debug --link postgis:postgis -i -t \
crccheck/postgis \
pg_dump -U docker -h postgis -p 5432 -Fc states
docker rm postgis
docker rmi crccheck/postgis
See my master repo at https://github.com/crccheck/docker-pod for more information.
Content type
Image
Digest
sha256:7713c619f…
Size
129.5 MB
Last updated
almost 11 years ago
docker pull crccheck/postgis