How to make sure docker's time syncs with that of the host?

前端 未结 17 1522
北恋
北恋 2020-12-02 07:10

I have dockers running on Linode servers. At times, I see that the time is not right on the dockers. Currently I have changed the run script in every docker to include the f

17条回答
  •  眼角桃花
    2020-12-02 07:25

    This will reset the time in the docker server:

    docker run --rm --privileged alpine hwclock -s
    

    Next time you create a container the clock should be correct.

    Source: https://github.com/docker/for-mac/issues/2076#issuecomment-353749995

提交回复
热议问题