pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: lms22114@awsoo.com
Subject: BUG #15470: Docker image dpage/pgadmin4:3.4 (and latest) fail with non-root user
Date: Tue, 30 Oct 2018 06:35:50 +0000
Message-ID: <15470-c84b4e5cc424169d@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15470
Logged by:          Daniel Dan
Email address:      lms22114@awsoo.com
PostgreSQL version: 11.0
Operating system:   Docker Image
Description:        

In some productive environments it is not allowed to run Docker containers
with root user (uid 0)

When pgadmin4 container is run with (user adm):
docker run --name pgadmin -u 3:4 -e
PGADMIN_DEFAULT_EMAIL=pgadmin@example.com -e PGADMIN_DEFAULT_PASSWORD=admin
dpage/pgadmin4:latest

The following errors occur:
Traceback (most recent call last):
  File "run_pgadmin.py", line 4, in <module>
    from pgAdmin4 import app
  File "/pgadmin4/pgAdmin4.py", line 70, in <module>
    app = create_app()
  File "/pgadmin4/pgadmin/__init__.py", line 225, in create_app
    create_app_data_directory(config)
  File "/pgadmin4/pgadmin/setup/data_directory.py", line 26, in
create_app_data_directory
    _create_directory_if_not_exists(os.path.dirname(config.LOG_FILE))
  File "/pgadmin4/pgadmin/setup/data_directory.py", line 15, in
_create_directory_if_not_exists
    os.mkdir(_path)
PermissionError: [Errno 13] Permission denied: '/var/log/pgadmin'
[2018-10-30 06:33:20 +0000] [1] [INFO] Starting gunicorn 19.8.1
[2018-10-30 06:33:20 +0000] [1] [ERROR] Retrying in 1 second.
[2018-10-30 06:33:21 +0000] [1] [ERROR] Retrying in 1 second.
[2018-10-30 06:33:22 +0000] [1] [ERROR] Retrying in 1 second.
[2018-10-30 06:33:23 +0000] [1] [ERROR] Retrying in 1 second.
[2018-10-30 06:33:24 +0000] [1] [ERROR] Retrying in 1 second.
[2018-10-30 06:33:25 +0000] [1] [ERROR] Can't connect to ('::', 80)



Message-ID: <15470-c84b4e5cc424169d@postgresql.org>
Permalink:  ../15470-c84b4e5cc424169d@postgresql.org/
Also on:    postgresql.org/message-id/15470-c84b4e5cc424169d@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, lms22114@awsoo.com
  Subject: Re: BUG #15470: Docker image dpage/pgadmin4:3.4 (and latest) fail with non-root user
  In-Reply-To: <15470-c84b4e5cc424169d@postgresql.org>
  References: <15470-c84b4e5cc424169d@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox