Forum Navigation
You need to log in to create posts and topics.

Setting Timezone in Docker Container


Docker Container does not obey to timezone settings and use default UTC


Depends on your linux distribution you need to add TZ utils to the operating system and run the following commands

Alpine Linux / NodeJS ( based on alpine linux

USER root
RUN apk update && apk upgrade && apk add ca-certificates && \
update-ca-certificates && apk add –update tzdata && \
rm -rf /var/cache/apk/*

Ubuntu Image 

USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y tzdata && \
apt-get clean && \
rm -fr /etc/localtime

CentOS Image

cd etc
mv /etc/localtime /etc/localtime.backup
ln -s /usr/share/zoneinfo/US/Central localtime


Check Timezone settings in NodeJS container


Welcome to Node.js v12.18.2.
Type “.help” for more information.



All content available through this Web Site is provided on an “AS IS” and “AS AVAILABLE” basis, with all faults. Tracston LTD makes no warranty or representation with respect to the quality, accuracy, or availability of the Web Site or any of its content.