From 125460345fe4bd0ed9be48a9fbc0657019637a01 Mon Sep 17 00:00:00 2001 From: djay Date: Thu, 25 Feb 2016 21:56:33 +0100 Subject: Add the timezone for PHP docker container --- docker/php/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docker') diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 7c56ae57..c230bc44 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -5,6 +5,8 @@ RUN apt-get update && apt-get install -y \ && docker-php-ext-install \ iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql +RUN echo "date.timezone=Europe/Paris" > /usr/local/etc/php/conf.d/date_timezone.ini + RUN usermod -u 1000 www-data CMD ["php-fpm"] -- cgit v1.2.3 From 612f5f1ec7eeaeacb1f1bc0f2e15fbe5ff7d7044 Mon Sep 17 00:00:00 2001 From: djay Date: Wed, 2 Mar 2016 13:31:53 +0100 Subject: Add the timezone as an argument in the docker-compose. For that, need to use v2 of docker-compose (with version >= 1.6.0) --- docker/php/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docker') diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index c230bc44..b43d40b5 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,11 +1,13 @@ FROM php:fpm +ARG timezone='Europe/Paris' + RUN apt-get update && apt-get install -y \ libmcrypt-dev libicu-dev libpq-dev libxml2-dev \ && docker-php-ext-install \ iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql -RUN echo "date.timezone=Europe/Paris" > /usr/local/etc/php/conf.d/date_timezone.ini +RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini RUN usermod -u 1000 www-data -- cgit v1.2.3 From b80841f23c6736aef7485aa3d8ba7cf0af861f64 Mon Sep 17 00:00:00 2001 From: djay Date: Thu, 3 Mar 2016 19:21:37 +0100 Subject: Add comment about timezone definition --- docker/php/Dockerfile | 1 + 1 file changed, 1 insertion(+) (limited to 'docker') diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index b43d40b5..29d27c3a 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,5 +1,6 @@ FROM php:fpm +# Default timezone. To change it, use the argument in the docker-compose.yml file ARG timezone='Europe/Paris' RUN apt-get update && apt-get install -y \ -- cgit v1.2.3