# Postgres docker Docker for postgres. The only significant change from default image is that image is run as local user postgres ## Installation Create user postgres on host machine (assuming local PC is not running postgres, if so, use local installation). ```bash sudo adduser postgres sudo su postgres git clone pgDocker cd pgDocker ``` Go to `pgDocker/bin` directory, copy `env.sh.sample` to `env.sh` and correct environment variables, particularly `$PGPASS` and `$DOCKERCOMPOSE` so they point to the correct files. Run `start.sh` ```bash pgDocker/bin/start.sh ``` And you should be able to connect via ```bash psql -p 5432 -h 127.0.0.1 -u postgres ``` Type the password set in `$PGPASS` to access the database.