Create workdirectory first where you run the pdamin. Then give it proper permissions
sudo chown -R 5050:5050 .
Then run pgadmin with
docker pull dpage/pgadmin4
run --network=host \
-v ./:/var/lib/pgadmin
-e '[email protected]' \
-e 'PGADMIN_DEFAULT_PASSWORD=postgres' \
dpage/pgadmin4