Re: problem with docker image - Mailing list pgadmin-support

From Mickaël SALMON
Subject Re: problem with docker image
Date
Msg-id PR3P193MB0764936EFB13F9B6297E9D6FC0270@PR3P193MB0764.EURP193.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: problem with docker image  (Dave Page <dpage@pgadmin.org>)
Responses Re: problem with docker image  (Dave Page <dpage@pgadmin.org>)
List pgadmin-support
Same problem after changing permissions to parent directory  :

$ rm -rf /root/pgadmin4/*
$ chown -R 5050:5050 /root/pgadmin4
$ chmod 777 /root/pgadmin4
$ ls -lh

drwxrwxrwx    3 5050     5050        4.0K Sep 10 12:29 pgadmin4

This is weird, servers.json is created with root permissions, should not it be 5050 ?

ms-alpine:~/pgadmin4# ls -lh
total 4K
drwxr-xr-x    2 root     root        4.0K Sep 10 12:29 servers.json



From: Dave Page <dpage@pgadmin.org>
Sent: Thursday, September 10, 2020 10:04
To: Mickaël SALMON <ms@sylob.com>
Cc: pgadmin-support@lists.postgresql.org <pgadmin-support@lists.postgresql.org>
Subject: Re: problem with docker image
 


On Thu, Sep 10, 2020 at 8:29 AM Mickaël SALMON <ms@sylob.com> wrote:
Hi community,

I have a problem mapping file servers.json with latest docker image.

Here is how I run my container :

docker run --name pgadmin4 --restart unless-stopped -p 80:80 -e 'PGADMIN_DEFAULT_EMAIL=XXX' -e 'PGADMIN_DEFAULT_PASSWORD=XXX' -v /root/pgadmin4/servers.json:/pgadmin4/servers.json -d dpage/pgadmin4

servers.json is mapped to a directory  :

ms-alpine:~/pgadmin4# ls -lh
total 4K
drwxr-xr-x    2 root     root        4.0K Sep 10 09:26 servers.json
Where am I wrong ?

I suspect the container (which runs under UID 5050) cannot read files in /root on your host. The file has permissions that would allow that, but does the directory it's in?
 

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: problem with docker image
Next
From: Dave Page
Date:
Subject: Re: problem with docker image