pull/7/head
Tim Sutton 2014-10-02 16:52:45 +02:00
rodzic c30dee363f
commit 0348c41a81
2 zmienionych plików z 32 dodań i 2 usunięć

Wyświetl plik

@ -62,6 +62,38 @@ To create a running container do:
sudo docker run --name "postgis" -p 25432:5432 -d -t kartoza/postgis sudo docker run --name "postgis" -p 25432:5432 -d -t kartoza/postgis
``` ```
You can also use the following environment variables to pass a
user name and password.
* -e USERNAME=<PGUSER>
* -e PASS=<PGPASSWORD>
These will be used to create a new superuser with
your preferred credentials. If these are not specified then the postgresql
user is set to 'docker' with password 'docker'.
## Convenience run script
For convenience we have provided a bash script for running this container
that lets you specify a volume mount point and a username / password
for the new instance superuser. It takes these options:
```
OPTIONS:
-h Show this message
-n Container name
-v Volume to mount the Postgres cluster into
-u Postgres user name (defaults to 'docker')
-p Postgres password (defaults to 'docker')
```
Example usage:
```
./run-postgis-docker.sh -v /tmp/foo/ -n postgis -u foo -p bar
```
## Connect via psql ## Connect via psql
Connect with psql (make sure you first install postgresql client tools on your Connect with psql (make sure you first install postgresql client tools on your

Wyświetl plik

@ -2,8 +2,6 @@
# This script will run as the postgres user due to the Dockerfile USER directive # This script will run as the postgres user due to the Dockerfile USER directive
set -x
DATADIR="/var/lib/postgresql/9.3/main" DATADIR="/var/lib/postgresql/9.3/main"
CONF="/etc/postgresql/9.3/main/postgresql.conf" CONF="/etc/postgresql/9.3/main/postgresql.conf"
POSTGRES="/usr/lib/postgresql/9.3/bin/postgres" POSTGRES="/usr/lib/postgresql/9.3/bin/postgres"