You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I frequently need to change configuration values other then the ones that are currently provided via ENV variables. However, mounting a volume is very inconvenient when deploying the container to a cluster. My solution so far has been to build a seperate image with the configuration baked in.
Idea
How about we just allow the user to put in any configuration in a new ENV variable called PMA_CONFIG and then just do the following in config.inc.php:
if (isset($_ENV['PMA_CONFIG'])) {
eval($_ENV['PMA_CONFIG']);
}
So the container could be run like this:
docker run -p 80:80 -e PMA_CONFIG='$cfg["SomeObscureConfig"] = "foobar";' phpmyadmin
That would allow the user to use any configuration option, without supplying a file - and without us having to do mapping for each and every single option.
Caveats
We would have to provide a section on how to properly escape code in env variables. I did
not get to do much experimentation yet, because the local docker build is failing for me.
But i foresee that some special chars like $'"& might be troublesome.
The text was updated successfully, but these errors were encountered:
Motivation
I frequently need to change configuration values other then the ones that are currently provided via ENV variables. However, mounting a volume is very inconvenient when deploying the container to a cluster. My solution so far has been to build a seperate image with the configuration baked in.
Idea
How about we just allow the user to put in any configuration in a new ENV variable called
PMA_CONFIG
and then just do the following inconfig.inc.php
:So the container could be run like this:
That would allow the user to use any configuration option, without supplying a file - and without us having to do mapping for each and every single option.
Caveats
We would have to provide a section on how to properly escape code in env variables. I did
not get to do much experimentation yet, because the local docker build is failing for me.
But i foresee that some special chars like
$'"&
might be troublesome.The text was updated successfully, but these errors were encountered: