10

Running pgAdmin 4.2.0 in a Docker container using the image dpage/pgadmin4, I notice that server connections are not being saved.

The container is created with the volume mapping:

./data/pgadmin:/root/.pgadmin

When the docker container is restarted, or when a user re-login to the dashboard, all the previously entered server connection details are gone.

How can we ensure that the connection details are properly saved?

Nyxynyx
  • 61,411
  • 155
  • 482
  • 830

2 Answers2

16

For anyone still with this issue, I got it working using container folder /var/lib/pgadmin, so in your yml volume:

./data/pgadmin:/var/lib/pgadmin
Scorpv69
  • 176
  • 2
  • 4
1

Do you start it with docker run dpage/pgadmin4 or docker start {containerID}?

When I was doing it with docker run I had similar issues as you, but when I changed to docker start all connection details were normally there (even after computer reboot).

  • Hello, welcome! I used `docker-compose up`, so I guess its equivalent to `docker run`. – Nyxynyx Apr 13 '20 at 15:14
  • 1
    @Nyxynyx Then you can try with `docker compose start` which also just restarts already created containers instead of creating new (as in case of `up`). If that does not help, please post your `yml` file that you are using with `docker compose`. – Klemen Zajc Apr 15 '20 at 05:41