Переглянути джерело

Docker Alpine time zone (#4903)

Allow setting the timezone with a `TZ` environment variable in our Alpine-based Docker images just like for our Debian-based Doker images.
See https://github.com/FreshRSS/FreshRSS/discussions/4898#discussioncomment-4245991
Alexandre Alapetite 3 роки тому
батько
коміт
60d626030d
2 змінених файлів з 6 додано та 0 видалено
  1. 3 0
      .devcontainer/Dockerfile
  2. 3 0
      Docker/Dockerfile-Alpine

+ 3 - 0
.devcontainer/Dockerfile

@@ -2,6 +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 \
 	apache2 php-apache2 \
 	php php-curl php-gmp php-intl php-mbstring php-xml php-zip \

+ 3 - 0
Docker/Dockerfile-Alpine

@@ -2,6 +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 \
 	apache2 php-apache2 \
 	php php-curl php-gmp php-intl php-mbstring php-xml php-zip \