php icon indicating copy to clipboard operation
php copied to clipboard

how to add php.ini

Open enricopuglia opened this issue 10 years ago • 7 comments

How can I add custom php.ini file to my docker container? which is the path where I should copy a custom php.ini file? is there a way to modify the php.ini values from env variables defined in Dockerfile?

enricopuglia avatar Oct 12 '16 15:10 enricopuglia

create your own Dockerfile and ADD php.ini /usr/local/etc/php

tylkomat avatar Oct 13 '16 15:10 tylkomat

You could also mount a volume with your php.ini at /usr/local/etc/php.

westy92 avatar Jan 30 '17 03:01 westy92

In addition to the solutions documented here, this is also documented in the official image description on the Docker Hub since https://github.com/docker-library/docs/pull/87. :+1:

tianon avatar Dec 22 '17 22:12 tianon

Thanks.

konohanaruto avatar Dec 23 '18 05:12 konohanaruto

create your own Dockerfile and ADD php.ini /usr/local/etc/php

where i get my php.ini ??

waellkh avatar Apr 19 '20 16:04 waellkh

@waellkh you need to create your php.ini file and save it in your root project, example from Google App Engine with PHP runtime https://github.com/GoogleCloudPlatform/php-docker/blob/master/php-base/php.ini

rhzs avatar Aug 04 '20 09:08 rhzs

create your own Dockerfile and ADD php.ini /usr/local/etc/php

I have this error Service 'phpt3' failed to build: ADD failed: stat /var/lib/docker/tmp/docker-builder311520649/php.ini: no such file or directory

seddikahmedg8 avatar Aug 14 '20 11:08 seddikahmedg8