Docker:如何更新容器中php.ini的更改

我有一个docker的容器里面有php5.6 。 当我testing一些东西,我得到这个错误: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. 这可以改变追加date.timezone = America/New_York到我的php.ini文件。 这正是我所做的。 但它不工作,似乎我应该重新启动一些服务,以真正“更新”我的php.ini文件。 那么,我应该怎么做来更新我的php.ini文件更改?

那么,我应该怎么做来更新我的php.ini文件更改?

改变你的源php.ini文件,并重新build立你的形象

如果你改变容器本身的文件,当你停止容器并重新启动它时,改变将会消失。

所以,你需要从你的源代码更新你的php.ini文件,然后重build图像来包含这个改变