-
Set up docker
sudo apt install docker.io
-
Pull pgadmin4 image
sudo docker pull dpage/pgadmin4
-
Create a directory in the host to store session data of PgAdmin4
sudo mkdir /var/lib/pgadmin
-
Map to Pgadmin user & group 5050
sudo chown -R 5050:5050 /var/lib/pgadmin/
-
Finally run the docker image
sudo docker run --name pgadmin -p 80:80 -v /var/lib/pgadmin:/var/lib/pgadmin -e '[email protected]' -e 'PGADMIN_DEFAULT_PASSWORD=thirumal' -d dpage/pgadmin4
sudo docker run --name pgadmin -p 5050:80 -v /var/lib/pgadmin:/var/lib/pgadmin -e '[email protected]' -e 'PGADMIN_DEFAULT_PASSWORD=thirumal' -d dpage/pgadmin4
-
Enter your IP address in the browser to access pgadmin4
-
Create server with host name/address
172.17.0.1
-
To start docker container
sudo docker start pgadmin