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
On Docker for Mac OS X Beta, I experienced significant drift on the VM, which is based on Alpine Linux. From Alpine Linux FAQ you can synchronize the VM's clock with the following command.
ntpd -d -q -n -p pool.ntp.org
However, getting access to a terminal on the VM is another question, which can be done if you use the screen command.
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
That path is a symlink, which on my system points at /dev/ttys003
.
Once you get in, note that the moby login
is simply root
with no password. After you have finished, CTRL-A, D will disconnect from the screen session.
NOTE: This used to be documented on Docker for Mac Trouble Shooting but that seems to have been taken down. I was lucky enough to be shown it while at Dockercon 2016. It seems Docker is trying to abstract the VM completely out of the experience, which explains why it's no longer documented.