From: | Bo Guo <bo(dot)guo(at)gisticinc(dot)com> |
---|---|
To: | pgadmin-support(at)lists(dot)postgresql(dot)org |
Subject: | pgadmin4 container install: volume mapping |
Date: | 2020-05-17 22:00:15 |
Message-ID: | 41167804-ea83-165d-8c63-6324b471e4c7@gisticinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Hi list,
I have been using the docker container install of pgAdmin4 for about a
year and half, during which time I tried several times trying to make
volume mapping work, to no avail.
Yes, the docker installation is very clean and simple. But I just could
not make volume mapping to work so that script files saved can be
accessed easily, and server connections or any session related history
etc. can be preserved when updating to use latest container images. I
hope someone can provide a pointer or two to help me.
Here is what I used to create the instance
docker run --name "pgadmin4.21" \
-p 5050:80 \
-e 'PGADMIN_DEFAULT_EMAIL=pgadmin(at)example(dot)com' \
-e 'PGADMIN_DEFAULT_PASSWORD=123456' \
-d dpage/pgadmin4 \
-v /opt/pgadmin_session:/var/lib/pgadmin \
-v /opt/pgadmin_config:/pgadmin4
Docker Inspection shows the container having
"Env": [
"PGADMIN_DEFAULT_EMAIL=pgadmin(at)example(dot)com",
"PGADMIN_DEFAULT_PASSWORD=123456",
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D",
"PYTHON_VERSION=3.7.7",
"PYTHON_PIP_VERSION=20.0.2",
"PYTHON_GET_PIP_SHA256=421ac1d44c0cf9730a088e337867d974b91bdce4ea2636099275071878cc189e",
"PYTHONPATH=/pgadmin4"
],
"Cmd": [
"-v",
"/opt/pgadmin_session:/var/lib/pgadmin",
"-v",
"/opt/pgadmin_config:/pgadmin4"
],
Before I start the container instance, I made sure the folders were
accessible
sudo mkdir /opt/pgadmin_session
sudo mkdir /opt/pgadmin_config
sudo chown 5050:5050 /opt/pgadmin_session
sudo chown 5050:5050 /opt/pgadmin_config
sudo chmod -R 777 /opt/pgadmin_session
sudo chmod -R 777 /opt/pgadmin_config
Cheers!
Bo
From | Date | Subject | |
---|---|---|---|
Next Message | Aditya Toshniwal | 2020-05-18 04:07:16 | Re: pgAdmin 4.21: Edge version not correctly recognized |
Previous Message | Sibylle Koczian | 2020-05-17 11:17:53 | pgAdmin 4.21: Edge version not correctly recognized |