From c449b529a578caaffe98683249af5bd5dcca6e10 Mon Sep 17 00:00:00 2001 From: root <517046497@qq.com> Date: Mon, 25 Jun 2018 07:05:09 -0400 Subject: [PATCH] update time_zone changeable --- image/pro_base/Dockerfile | 2 +- scripts/create_data_links.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/image/pro_base/Dockerfile b/image/pro_base/Dockerfile index 58e37df..7f095f1 100644 --- a/image/pro_base/Dockerfile +++ b/image/pro_base/Dockerfile @@ -7,7 +7,7 @@ RUN apt update RUN apt-get install -y openjdk-8-jre libmemcached-dev zlib1g-dev pwgen curl openssl poppler-utils libpython2.7 libreoffice \ libreoffice-script-provider-python ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy python-requests -RUN apt-get install -y python-pip python-setuptools python-urllib3 python-ldap python-ceph +RUN apt-get install -y tzdata python-pip python-setuptools python-urllib3 python-ldap python-ceph RUN pip install pylibmc django-pylibmc boto twilio oss2 diff --git a/scripts/create_data_links.sh b/scripts/create_data_links.sh index bd5e061..bb2ea95 100755 --- a/scripts/create_data_links.sh +++ b/scripts/create_data_links.sh @@ -7,6 +7,17 @@ if [[ $SEAFILE_BOOTSRAP != "" ]]; then exit 0 fi +if [[ $TIME_ZONE != "" ]]; then + time_zone=/usr/share/zoneinfo/$TIME_ZONE + if [[ ! -e $time_zone ]]; then + echo "invalid time zone" + exit 1 + else + ln -snf $time_zone /etc/localtime + echo "$TIME_ZONE" > /etc/timezone + fi +fi + dirs=( conf ccnet