Export:
get container id: docker ps dump server list: docker exec -it {container id} python setup.py --dump-servers servers.json --user {user} get server list: docker cp {container id}:/pgadmin4/servers.json servers.json
Import:
launch pgadmin: docker run -p 801:80 --name pgadmin \ -e "PGADMIN_DEFAULT_EMAIL={user}" \ -e "PGADMIN_DEFAULT_PASSWORD={pass}" \ -d dpage/pgadmin4 get container id: docker ps copy server list into container: docker cp {container id}:/tmp/servers.json import server list: docker exec -it {container id} python setup.py --load-servers servers.json --user {user}
source: https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html