update time_zone changeable

This commit is contained in:
root 2018-06-25 07:05:09 -04:00 committed by Hu
parent 400070158e
commit c449b529a5
2 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -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