I am now trying to work through the initial setup in server deployment, regarding setting config files and running setup.py.
My guess is that this is the wrong way to go about a windows deployment in this context, but I’m not sure.
I did try the method of passing environment variables to my container. Unfortunately, the results are the same. Without something built into the Dockerfile to run the setup.py, no configuration is done during image build. When I run the image using ‘docker run -e …’, and then execute setup.py, it does not appear to see the environment variables, and hangs as before.
The Windows installer for pgAdmin is designed to install it onto a desktop machine as a normal application for a single user. setup.py is only used (by end users - pgAdmin still uses it internally) when setting up to run in Server mode for multiple users to access using their browser.
What you're trying to do is not supported, and will not work in a safe and secure manner without a significant amount of effort (probably development effort, not just on your part).
The supported ways to run pgAdmin are documented at https://www.pgadmin.org/docs/pgadmin4/6.7/deployment.html (ignore the Cloud Deployment link - that's something different that needs to be moved). If you want to run pgAdmin in a container, follow the instructions in the container deployment section. The container that will be deployed is a Linux one, which (I believe) you can deploy using Docker with WSL or Hyper-V.