I discovered Docker not longtime ago, that is exactly what i need to run applications on previous versions of PHP under Ubuntu.
I installed Dolibarr which is a commercial management PHP software, it is running but the pages are permanently polluted by dose of warning like this
> Warning: getdate(): 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. in /var/www/html/dolibarr/htdocs/core/lib/functions.lib.php on line 1702
I searched a lot on this problem and i could find it is a problem of the timezone not set inside the container, i tried a lot of tries but nothing drove to success.
There is my docker-compose.yml file :
version: '2' services: web: image: lavoweb/php-5.6 ports: - "80:80" volumes: - ~/www:/var/www/html - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" links: - db:db db: image: mysql:5.5 volumes: - ~/mysql:/var/lib/mysql ports: - "3306:3306" environment: - MYSQL_ROOT_PASSWORD=root myadmin: image: phpmyadmin/phpmyadmin ports: - "8080:80" links: - db:db
Please if anyone as a solution , let me know
Thanks a lot