解决方案:
1,最傻瓜也最方便的处理方式,运行新的容器前设置本机时区和时间文件与容器的映射

docker run -v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime ...1
-v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime 命令为文件映射的命令,后面在写自己的启动代码。
2,拷贝文件到已经存在的容器

docker cp /etc/localtime [containerId]:/etc/localtime
docker cp /etc/timezone [containerId]:/etc/timezone12
以上将宿主机的时间与本地时间绑定到容器中,这样时间就会跟宿主机一样了。

/etc/timezone // 时区
/etc/localtime // 时间12
验证时间是否正确,在控制台输入以下命令即可

[root@izbp11gsqdkmgt6b1r4kajz ~]# date
2018-09-07 09:49:32

10-14 20:46