解决 Docker 容器与宿主机时间不同步 发表 2020-03-03 晚上 分类 Docker 解决方式一:追加容器启动参数123-v /etc/localtime:/etc/localtime:ro# 或-e "TZ=Asia/Shanghai" 解决方式二:调整 Dockerfile 参数12ENV TZ=America/Los_AngelesRUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 参照: https://serverfault.com/questions/683605/docker-container-time-timezone-will-not-reflect-changes http://stackoverflow.com/questions/22800624/will-docker-container-auto-sync-time-with-the-host-machine