This is the README.md for Docker tag postgresql-9.1.2-postgis-1.5.8-patched.
WARNING: This image is deprecated. Use tag Awkward Aardvark instead.
This Dockerfile compiles the following software:
-
PostgreSQL 9.1.2;
-
GEOS 3.4.2;
-
Proj 4.8.0: patched with the spanish national grid for conversion between ED50 to ETRS89;
-
Postgis 1.5.8: patched as well.
Build the image directly from Git (this can take a while, don't forget to checkout the right branch):
cd gitfolder
docker build -t="geographica/postgis:postgresql-9.1.2-postgis-1.5.8-patched" .
or pull it from Docker Hub:
docker pull geographica/postgis:postgresql-9.1.2-postgis-1.5.8-patched
The image uses several environment variables. Refer to the Dockerfile for a complete list. The most important one is POSTGRES_PASSWD, the password for the user POSTGRES.
The image exposes port 5432 and a volume designated by enviroment variable POSTGRES_DATA_FOLDER. In a production enviroment, create containers this way:
docker run -d -P --name whatever -e "POSTGRES_PASSWD="md5"$(printf '%s' "change_this_password" "postgres" | md5sum | cut -d ' ' -f 1)" geographica/postgis:postgresql-9.1.2-postgis-1.5.8-patched
This generates a MD5 hashed password for the user postgres. Keep in mind that to provide a MD5-hashed password to PostgreSQL it has to be the hash of passwordusername and be prefixed by md5.
The image creates containers that initializes automatically a datastore, setting the password for user postgres.