From a4a3f175a42b36fa37b448ad3a6a108c0481caac Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 24 Aug 2019 08:25:41 +0200 Subject: [PATCH] ensure latest alpine 3.10 is used, add tzdata to support timezone in nginx logs --- Dockerfile | 6 +++--- README.md | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7cd9ec6..9c90c9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.10.0 +FROM alpine:3.10 MAINTAINER PrivateBin @@ -6,8 +6,8 @@ ENV RELEASE 1.3 RUN \ # Install dependencies - apk add --no-cache supervisor nginx php7-fpm php7-json php7-gd php7-opcache \ - php7-pdo_mysql php7-pdo_pgsql \ + apk add --no-cache supervisor tzdata nginx php7-fpm \ + php7-json php7-gd php7-opcache php7-pdo_mysql php7-pdo_pgsql \ # Remove (some of the) default nginx config && rm -f /etc/nginx.conf \ && rm -f /etc/nginx/conf.d/default.conf \ diff --git a/README.md b/README.md index e06e0be..23590f3 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,15 @@ docker run -d --restart="always" --read-only -p 8080:80 -v conf.php:/srv/cfg/con Note: The `Filesystem` data storage is supported out of the box. The image includes PDO modules for MySQL and SQLite, required for the `Database` one, but you still need to keep the /srv/data persisted for the server salt and the traffic limiter. +### Timezone settings + +The image supports the use of the following two environment variables to adjust the timezone. This is most useful to ensure the logs show the correct local time. + +- `TZ` +- `PHP_TZ` + +Note: The application internally handles expiration of pastes based on a UNIX timestamp that is calculated based on the timezone set during its creation. Changing the PHP_TZ will affect this and leads to earlier (if the timezone is increased) or later (if it is decreased) expiration then expected. + ## Rolling your own image To reproduce the image, run: