Owncloud docker image: php path order (bug or a feature)

I have a question (and/or a comment).

I’m running dockerized owncloud server, using openidconnect app for authentication. Since I have upgraded to docker image version 10.15 (i don’t exactly recall when, and which sub version, but currently I’m on 10.15.0.2) I have encountered problem with logging in of new users. I opened an issue on owncloud/openidconnect (#326), and it came out it is a bug in app.

Since i have installed opeindconnet app with App Management panel, my plan was to test the possible fix, by modifying app’s php code in my “owcloud/apps” directory (I’m talking about owncloud directory, which is mounted in docker image, under /mnt/data). But to no avail the changes did not make any affect.

After some digging, into docker image content, I found out that openidconnect app already exists inside container, under path /var/www/owncloud/apps and those installed by App Management panel, reside under /var/www/owncloud/custom (as a link to /mnt/data/apps).

With some further digging, I found out that php paths are defined in config files as:

'apps_paths' => [
  0 => [
    "path" => OC::$SERVERROOT . "/apps",
    "url" => "/apps",
    "writable" => false
  ],
  1 => [
    "path" => OC::$SERVERROOT . "/custom",
    "url" => "/custom",
    "writable" => true
  ]
],

Given configuration is generated on each start of docker container from template: /etc/template/config.php (which is part of docker image).

The order of the paths, as defined in config file, prevents usage of apps installed from App Management panel, if corresponding app is already installed inside docker image.

My questions are as follows:

  1. Is this intended behavior of docker image? This approach prevents us from installing updated version of the app, since app installed from App Management panel (possibly with some bug fixes), has no effect, since already existing installation in docker image, always take precedence.
  2. Is there a way, to change order of apps_path since, adding modified config into owncloud/config directory makes no affect. (or at least I am unsuccessful in achieving to apply the changes)

Note:
Since I’m running production server, I had to apply necessary fix. To achieve that, I have copied entire content of /var/www/owncloud/apps directory, to my host machine, made changes in exported files, and mount them as volume in docker image overshadowing original /var/www/owncloud/apps directory.

While this solution works, it is not permanent solution, and question of php path order still exists.