If you are on OSX running boot2docker see this issue: https://github.com/boot2docker/boot2docker/issues/290
Time synchronization becomes a problem because the boot2docker host has its time drift while your OS is sleeping. Time synchronization with the docker container cannot be resolved by starting your container with -v /etc/localtime:/etc/localtime:ro
Instead, this time you need to run this periodically on OSX:
/usr/local/bin/boot2docker ssh sudo ntpclient -s -h pool.ntp.org
Update for Kitematic Users
If you are using Kitematic , which is now the proposed mechanism for launching and launching Docker on OSX, you will have to run this command periodically:
docker-machine ssh default 'sudo ntpclient -s -h pool.ntp.org'
Or, for older versions of dockers
docker-machine ssh dev 'sudo ntpclient -s -h pool.ntp.org'
Update for users of the new native Docker for OSX
New beta version of Docker removes VirtualBox and Docker Machine. The latest docker builds (currently 1.12.1-beta25 (build: 11807)) seem to have the ability to detect when there was a time gap, and adjust accordingly. So this should no longer be a problem ... hooray !!
esilver Oct 19 '14 at 18:44 2014-10-19 18:44
source share