You can also use docker-compose by creating a docker-compose.yaml as follows
version: '3'
services:
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:latest
restart: always
ports:
- 8082:80
environment:
- PGADMIN_DEFAULT_EMAIL=dev@pgadmin.org
- PGADMIN_DEFAULT_PASSWORD=password
and running docker-compose up
.
Make sure you have docker-compose installed if you are going to use this method.