Change the timezone in the Liferay's official Docker Image


  • How to modify the OS-level timezone in Liferay's official Docker Image?


  • Liferay DXP 7.4


Please note: The following information involves customizations or implementation ideas that are beyond the scope of Liferay Support. Please exercise appropriate discretion in the use of this information to choose to follow it. 

  • There is no OOS feature available to change the timezone of the docker image.
  • However, in order to modify the timezone, one needs to customize the Dockerfile.ext

Additional Information

  • Workaround to achieve this functionality: Add the below snippet in the Dockerfile.ext
    USER root
    ENV DEBIAN_FRONTEND=noninteractive
    RUN apt-get -y update && apt-get -y install tzdata
    ENV TZ="Asia/Kolkata"
    USER liferay
0 人中有 0 人觉得有帮助