警告:filemtime():使用libfaketime更改Symfony Docker容器日期时,stat失败错误

时间:2019-02-08 09:32:33

标签: docker docker-compose symfony4

我们正在开发一个以Symfony 4 API为后端的Angular应用程序,每个应用程序都在单独的Docker容器中。 我们需要更改Symfony Docker容器的日期以进行一些测试,因此我们安装了libfaketime来修改系统日期。

我使用sudo FAKETIME="2019-11-12 00:00:00" docker-compose up运行容器,这似乎阻止了我的应用程序正常运行。

实际上,我的dev.log日志包含类似以下的奇怪警告:

[2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.fr.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.gl.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.he.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.hr.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.hu.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.hy.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.id.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.it.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.ja.xlf [] [] [2019-02-07 17:56:05] php.DEBUG: Warning: filemtime(): stat failed for /var/www/default/vendor/symfony/validator/Resources/translations/validators.lb.xlf [] []

每个警告位于另一个文件上。

当我在没有FAKETIME="2019-11-12 00:00:00的情况下运行容器时,应用程序将正确运行。

有什么想法吗?

0 个答案:

没有答案