本文共 321 字,大约阅读时间需要 1 分钟。
echo “TZ=‘Asia/Shanghai’; export TZ” >> /root/.profile
source /root/.profile echo “Asia/Shanghai” > /etc/timezone cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime service cron restart将宿主机的时区拷进去
docker cp /etc/timezone [containerId]:/etc/timezone docker cp /etc/localtime [containerId]:/etc/localtime转载地址:http://jhfef.baihongyu.com/