dockage/phppgadmin

By dockage

Updated over 5 years ago

phpPgAdmin Docker image, phpPgAdmin is a web-based administration tool for PostgreSQL.

Image
Databases & Storage
Security
Web Servers

5M+

phpPgAdmin Docker PullsDocker StarsMicroBadgerDocker Automated build

phpPgAdmin is a web-based administration tool for PostgreSQL. It is perfect for PostgreSQL DBAs, newbies, and hosting services.

Contributing

If you find this image useful here's how you can help:

  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.

Issues

Before reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker installation guide for instructions.

SELinux users should try disabling SELinux using the command setenforce 0 to see if it resolves the issue.

If the above recommendations do not help then report your issue along with the following information:

  • Output of the docker vers6 and docker info commands
  • The docker run command or docker-compose.yml used to start the image. Mask out the sensitive bits.
  • Please state if you are using Boot2Docker, VirtualBox, etc.

Getting started

Installation

Pull the image from the docker index. This is the recommended method of installation as it is easier to update image. These builds are performed by the Docker Trusted Build service.

docker pull dockage/phppgadmin:latest

Alternately you can build the image locally.

git clone https://github.com/dockage/phppgadmin.git
cd phppgadmin
docker build --tag="$USER/phppgadmin" .

Quick Start

The quickest way to get started is using docker-compose.

wget https://raw.githubusercontent.com/dockage/phppgadmin/master/docker-compose.yml
docker-compose up

Alternately, you can manually launch the phppgadmin container.

docker run --name='phppgadmin' -d \
  --publish=80:80 \
dockage/phppgadmin:latest
Available Configuration Parameters

Please refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternatively you can use docker-compose.

Below is the complete list of available options that can be used to customize your phppgadmin installation.

ParameterDescription
PHP_PG_ADMIN_SERVER_DESCDisplay name for the server on the login screen. Defaults to PostgreSQL.
PHP_PG_ADMIN_SERVER_HOSTHostname or IP address for server. Use '' for UNIX domain socket. Defaults to ``.
PHP_PG_ADMIN_SERVER_PORTDatabase port on server. Defaults to 5432.
PHP_PG_ADMIN_SERVER_SSL_MODEDatabase SSL mode. Possible options: disable, allow, prefer, require. To require SSL on older servers use option: legacy. To ignore the SSL mode, use option: unspecified. Defaults to allow
PHP_PG_ADMIN_SERVER_DEFAULT_DBChange the default database only if you cannot connect to template1. Defaults to template1.
PHP_PG_ADMIN_SERVER_PG_DUMP_PATHSpecify the path to the database dump utilities for this server. Defaults to /usr/bin/pg_dump.
PHP_PG_ADMIN_SERVER_PG_DUMPALL_PATHSpecify the path to the database dump utilities for this server. Defaults to /usr/bin/pg_dumpall.
PHP_PG_ADMIN_DEFAULT_LANGDefault language. E.g.: english, polish, etc. See lang directory for all possibilities. If you specify auto it will use your browser preference. Defaults to auto.
PHP_PG_ADMIN_AUTO_COMPLETEAutoComplete uses AJAX interaction to list foreign key values on insert fields. It currently only works on single column foreign keys. You can choose one of the following values: default on enables AutoComplete and turns it on by default. default off enables AutoComplete but turns it off by default. disable disables AutoComplete. Defaults to default on.
PHP_PG_ADMIN_EXTRA_LOGIN_SECURITYIf extra login security is true, then logins via phpPgAdmin with no password or certain usernames (pgsql, postgres, root, administrator) will be denied. Only set this false once you have read the FAQ and understand how to change PostgreSQL's pg_hba.conf to enable passworded local connections. Defaults to false.
PHP_PG_ADMIN_OWNED_ONLYOnly show owned databases? Note: This will simply hide other databases in the list - this does not in any way prevent your users from seeing other database by other means. (e.g. Run SELECT * FROM pg_database in the SQL area.). Defaults to false.
PHP_PG_ADMIN_SHOW_COMMENTSDisplay comments on objects? Comments are a good way of documenting a database, but they do take up space in the interface. Defaults to true.
PHP_PG_ADMIN_SHOW_ADVANCEDDisplay "advanced" objects? Setting this to true will show aggregates, types, operators, operator classes, conversions, languages and casts in phpPgAdmin. These objects are rarely administered and can clutter the interface. Defaults to false.
PHP_PG_ADMIN_SHOW_SYSTEMDisplay "system" objects? Defaults to false.
PHP_PG_ADMIN_MIN_PASSWORD_LENGTHMinimum length users can set their password to. Defaults to 1.
PHP_PG_ADMIN_LEFT_WIDTHWidth of the left frame in pixels (object browser). Defaults to 200.
PHP_PG_ADMIN_THEMEWhich look & feel theme to use. Defaults to default.
PHP_PG_ADMIN_SHOW_OIDSShow OIDs when browsing tables? Defaults to false.
PHP_PG_ADMIN_MAX_ROWSMax rows to show on a page when browsing record sets. Defaults to 30.
PHP_PG_ADMIN_MAX_CHARSMax chars of each field to display by default in browse mode. Defaults to 50.
PHP_PG_ADMIN_USE_XHTML_STRICTSend XHTML strict headers? Defaults to false.
PHP_PG_ADMIN_HELP_BASEBase URL for PostgreSQL documentation. '%s', if present, will be replaced with the PostgreSQL version (e.g. 8.4). Defaults to http://www.postgresql.org/docs/%s/interactive/.
PHP_PG_ADMIN_AJAX_REFRESHConfiguration for ajax scripts. Time in seconds. If set to 0, refreshing data using ajax will be disabled (locks and activity pages). Defaults to 3.

Upgrading

To upgrade to newer phppgadmin releases, simply follow this 3 step upgrade procedure.

  • Step 1: Update the docker image.
docker pull dockage/phppgadmin:latest
  • Step 2: Stop and remove the currently running image
docker stop phppgadmin
docker rm phppgadmin
  • Step 3: Start the image
docker run --name=phppgadmin -d [OPTIONS] dockage/phppgadmin:latest

Quick reference

Docker Pull Command

docker pull dockage/phppgadmin