Where do Docker containers get their time information? I've created some containers from the basic ubuntu:trusty image, and when I run it and request 'date', I get UTC time.
For awhile I got around this by doing the following in my Dockerfile:
RUN sudo echo "America/Los_Angeles" > /etc/timezone
However, for some reason that stopped working. Searching online I saw the below suggested:
docker run -v /etc/timezone:/etc/timezone [image-name]
Both these methods correctly set the timezone though!
$ cat /etc/timezone America/Los_Angeles $ date Tue Apr 14 23:46:51 UTC 2015
Anyone know what gives?