Giving I already changed the timezone of docker container correctly. Do I need to install a NTP server inside the docker container to periodically sync the time or the conta
The current solution for osx time drift on docker (April 2018):
I do have my mac on an NTP server, but this fixed clock drift with containers:
From https://docs.docker.com/docker-for-mac/troubleshoot/#known-issues :
If your system does not have access to an NTP server, then after a hibernate the time seen by Docker for Mac may be considerably out of sync with the host. Furthermore, the time may slowly drift out of sync during use. To manually reset the time after hibernation, run:
docker run --rm --privileged alpine hwclock -s
Or, to resolve both issues, you can add the local clock as a low-priority (high stratum) fallback NTP time source for the host. To do this, edit the host’s /etc/ntp-restrict.conf to add:
server 127.127.1.1 # LCL, local clock
fudge 127.127.1.1 stratum 12 # increase stratum
Then restart the NTP service with:
sudo launchctl unload /System/Library/LaunchDaemons/org.ntp.ntpd.plist
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist