java - Docker容器时间同步问题?
PHPz
PHPz 2017-04-18 09:28:59
0
2
358
PHPz
PHPz

学习是最好的投资!

reply all(2)
左手右手慢动作

The system has been changed to UTC, how to change it to CST?
Since the /usr/share/zoneinfo/Asia/Shanghai file was modified at the beginning, the file was restored later, and then executed /usr/share/zoneinfo/Asia/Shanghai文件,后面将文件恢复了,然后执行
cp -af /usr/share/zoneinfo/Asia/Shanghai /etc/localtimecp -af /usr/share/zoneinfo/Asia/Shanghai / etc/localtime will do the trick.

docker time synchronization:
can be modified through docker cp /etc/localtime [containerId]:/etc/localtime

洪涛

I also encountered this situation. I don’t know whether your mysql is installed directly on the system or is a mirror pulled from the official one.
I changed the time zone directly from the Dockerfile of the official image: link description

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template