aboutsummaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-11-30 20:45:40 +0100
committerGravatar GitHub <noreply@github.com> 2022-11-30 20:45:40 +0100
commit543fa4e76c1761154801febd08400520b75143e3 (patch)
tree5c554a1e9ea48d217edceed09284d9946b2fccb2 /Docker
parentf41a574a9f693d81c6eabff7a05ebf3648858d5b (diff)
Docker uniform timezone behaviour (#4905)
* Docker Alpine timezone for :newest and :oldest Follow-up of https://github.com/FreshRSS/FreshRSS/pull/4903 Forgot the development images Newest and Oldest * Uniform timezone behaviour * shellcheck * A bit more documentation
Diffstat (limited to 'Docker')
-rw-r--r--Docker/Dockerfile2
-rw-r--r--Docker/Dockerfile-Alpine3
-rw-r--r--Docker/Dockerfile-Oldest2
-rw-r--r--Docker/Dockerfile-QEMU-ARM2
-rw-r--r--Docker/README.md6
-rwxr-xr-xDocker/entrypoint.sh5
6 files changed, 14 insertions, 6 deletions
diff --git a/Docker/Dockerfile b/Docker/Dockerfile
index b462263fb..08e6dce43 100644
--- a/Docker/Dockerfile
+++ b/Docker/Dockerfile
@@ -2,8 +2,8 @@ FROM debian:11-slim
ENV TZ UTC
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install --no-install-recommends -y \
ca-certificates cron \
diff --git a/Docker/Dockerfile-Alpine b/Docker/Dockerfile-Alpine
index 9bc74800e..65c2de6be 100644
--- a/Docker/Dockerfile-Alpine
+++ b/Docker/Dockerfile-Alpine
@@ -2,10 +2,9 @@ FROM alpine:3.17
ENV TZ UTC
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
-RUN apk add --no-cache tzdata && \
- ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apk add --no-cache \
+ tzdata \
apache2 php-apache2 \
php php-curl php-gmp php-intl php-mbstring php-xml php-zip \
php-ctype php-dom php-fileinfo php-iconv php-json php-opcache php-openssl php-phar php-session php-simplexml php-xmlreader php-xmlwriter php-xml php-tokenizer php-zlib \
diff --git a/Docker/Dockerfile-Oldest b/Docker/Dockerfile-Oldest
index b4dc13ddc..ede1ba643 100644
--- a/Docker/Dockerfile-Oldest
+++ b/Docker/Dockerfile-Oldest
@@ -2,7 +2,9 @@ FROM alpine:3.8
ENV TZ UTC
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
+
RUN apk add --no-cache \
+ tzdata \
apache2 php7-apache2 \
php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \
php7-ctype php7-dom php7-iconv php7-json php7-opcache php7-openssl php7-phar php7-session php7-xmlreader php7-xml php7-zlib \
diff --git a/Docker/Dockerfile-QEMU-ARM b/Docker/Dockerfile-QEMU-ARM
index 042597dec..892cbc955 100644
--- a/Docker/Dockerfile-QEMU-ARM
+++ b/Docker/Dockerfile-QEMU-ARM
@@ -8,8 +8,8 @@ COPY ./Docker/qemu-arm-* /usr/bin/
ENV TZ UTC
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
-RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install --no-install-recommends -y \
ca-certificates cron \
diff --git a/Docker/README.md b/Docker/README.md
index 44963ba0c..a4c0e8289 100644
--- a/Docker/README.md
+++ b/Docker/README.md
@@ -81,7 +81,7 @@ and with newer packages in general (Apache, PHP).
## Environment variables
-* `TZ`: (default is `UTC`) A [server timezone](http://php.net/timezones) (default is `UTC`)
+* `TZ`: (default is `UTC`) A [server timezone](http://php.net/timezones)
* `CRON_MIN`: (default is disabled) Define minutes for the built-in cron job to automatically refresh feeds (see below for more advanced options)
* `FRESHRSS_ENV`: (default is `production`) Enables additional development information if set to `development` (increases the level of logging and ensures that errors are displayed) (see below for more development options)
* `COPY_LOG_TO_SYSLOG`: (default is `On`) Copy all the logs to syslog
@@ -303,6 +303,7 @@ services:
options:
max-size: 10m
volumes:
+ # Recommended volume for FreshRSS persistent data such as configuration and SQLite databases
- data:/var/www/FreshRSS/data
# Optional volume for storing third-party extensions
- extensions:/var/www/FreshRSS/extensions
@@ -314,8 +315,11 @@ services:
# If you want to open a port 8080 on the local machine:
- "8080:80"
environment:
+ # A timezone http://php.net/timezones (default is UTC)
TZ: Europe/Paris
+ # Cron job to refresh feeds at specified minutes
CRON_MIN: '2,32'
+ # 'development' for additional logs; default is 'production'
FRESHRSS_ENV: development
# Optional advanced parameter controlling the internal Apache listening port
LISTEN: 0.0.0.0:80
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index 82c2e358e..00e80f629 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -1,11 +1,14 @@
#!/bin/sh
-php -f ./cli/prepare.php >/dev/null
+ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime
+echo "$TZ" >/etc/timezone
find /etc/php*/ -type f -name php.ini -exec sed -r -i "\\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \;
find /etc/php*/ -type f -name php.ini -exec sed -r -i "\\#^;?post_max_size#s#^.*#post_max_size = 32M#" {} \;
find /etc/php*/ -type f -name php.ini -exec sed -r -i "\\#^;?upload_max_filesize#s#^.*#upload_max_filesize = 32M#" {} \;
+php -f ./cli/prepare.php >/dev/null
+
if [ -n "$LISTEN" ]; then
find /etc/apache2/ -type f -name FreshRSS.Apache.conf -exec sed -r -i "\\#^Listen#s#^.*#Listen $LISTEN#" {} \;
fi