Change the timezone in the Liferay's official Docker Image

Issue

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

Environment

  • Liferay DXP 7.4

Resolution

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
Este artigo foi útil?
Utilizadores que acharam útil: 0 de 0