浏览代码

Changed Timezone setting methode

hmetzner 7 年之前
父节点
当前提交
86c977467f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      fhem/Dockerfile

+ 3 - 1
fhem/Dockerfile

@@ -85,7 +85,9 @@ RUN cpan Net::MQTT::Simple
 RUN cpan Net::MQTT::Constants
 
 # Install fhem
-RUN echo Europe/Berlin > /etc/timezone && dpkg-reconfigure tzdata
+# Set timezone to Europe/Berlin
+ENV TZ=Europe/Berlin
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 
 RUN wget https://fhem.de/fhem-${FHEM_VERSION}.deb && dpkg -i fhem-${FHEM_VERSION}.deb
 RUN userdel fhem