Public | Automated Build

Last pushed: 5 months ago
Short Description
The pgAdmin 3 administration tool for PostgreSQL.
Full Description

NDD Docker pgAdmin3

A Docker image for pgAdmin3.

A Docker image for pgAdmin4 in server mode is available too!

The image is based upon the official debian:jessie image and the official pgAdmin3 release.

Installation

From source

git clone git@bitbucket.org:ndd-docker/ndd-docker-pgadmin.git
cd ndd-docker-pgadmin
docker build -t ddidier/pgadmin .

From Docker Hub

docker pull ddidier/pgadmin

Usage

pgAdmin3 will be executed by the pgadmin3 user which is created by the Docker entry point. You must pass to the container the environment variable USER_ID set to the UID of the user the files will belong to. For example -e USER_ID=`id -u $USER` .

The settings are stored in the container in the directory /home/pgadmin3. You have multiple choices to keep them:

  • never delete your container
  • use a data volume e.g. -v $HOST_DATA_DIR:/home/pgadmin3
  • use a data volume container e.g. --volumes-from pgadmin-data

If you store these data in a directory like ~/.docker-data/<CONTAINER_NAME>, you can run this image using:

  • the legacy networking:
docker run --rm                              \
    -v /tmp/.X11-unix:/tmp/.X11-unix         \
    -v ~/.docker-data/pgadmin:/home/pgadmin3 \
    -e DISPLAY=$DISPLAY                      \
    -e USER_ID=`id -u $USER`                 \
    --link postgres:postgres                 \
    --name pgadmin                           \
    ddidier/pgadmin
  • a custom network:
docker run --rm                              \
    -v /tmp/.X11-unix:/tmp/.X11-unix         \
    -v ~/.docker-data/pgadmin:/home/pgadmin3 \
    -e DISPLAY=$DISPLAY                      \
    -e USER_ID=`id -u $USER`                 \
    --net=mynetwork                          \
    --name pgadmin                           \
    ddidier/pgadmin

Configuration

To enable backup/restore, go in File > Options > Browser > Binary paths and set PG bin path to /usr/lib/postgresql/9.6/bin.

Docker Pull Command
Owner
ddidier
Source Repository

Comments (0)