docker容器与宿主机时间同步设置

将docker容器/etc/localtime 和/etc/timezone 与宿主机文件共享就能实现时间同步(亲测可行)

只要修改docker-compose.yml文件就好

     volumes:
       - /etc/timezone:/etc/timezone
       - /etc/localtime:/etc/localtime

猜你喜欢

转载自blog.csdn.net/qq_38082304/article/details/80885783
今日推荐