Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php] variable via entrypoint/env #49

Closed
talset opened this issue Feb 14, 2019 · 3 comments
Closed

[php] variable via entrypoint/env #49

talset opened this issue Feb 14, 2019 · 3 comments

Comments

@talset
Copy link

talset commented Feb 14, 2019

It would be nice to be able to change your default php setting (https://github.com/TimWolla/docker-adminer/blob/master/4/fastcgi/Dockerfile#L3-L7)

You should be able to handle them in the entrypoint by changing the /usr/local/etc/php/conf.d/0-upload_large_dumps.ini or put an example of how to to provide the param via the php cli php "$@

@TimWolla
Copy link
Owner

@talset
Copy link
Author

talset commented Feb 14, 2019

See #36 (comment) and docker-library/php#765 (comment)

I read the comments but I'm sorry it is still note "fixed". It would be nice to have a proper solution to set php limits via variables (not workaround). Or at least having something documented on github or hub.docker.

@TimWolla
Copy link
Owner

It would be nice to have a proper solution to set php limits via variables (not workaround)

Using Docker's features to create your own image off an existing image is not a workaround. Using PHP's feature to read environment variables in php.ini is not a workaround either.
I'm not going to special case this image by adding support to override arbitrary configuration values and I'm not going to special case specific configuration values, because there will always be someone that just needs to override one more configuration value.
What I am going to (and what I did) is setting sane default values after previous user requests, because users successfully convinced me that e.g. the default upload_max_filesize of 2 MB is a bit low.

See also this (different) comment from #36 (especially the last paragraph): #36 (comment)

Or at least having something documented on github or hub.docker.

Environments differ greatly. Some users are best suited by building their own image, some prefer to just bind-mount a single file into the container. When using the FastCGI version the web server (e.g. nginx) might need to be reconfigured as well.

There's enough documentation on how PHP works out in the Internet. Changing the configuration is even explained in the documentation for PHP's image on Docker Hub: https://hub.docker.com/_/php/#configuration. I made sure to prefix my configuration file with 0 to make sure it is being loaded first and easily overriden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants