Skip to content

Instantly share code, notes, and snippets.

@sirkkalap
Created February 23, 2015 23:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirkkalap/8deca22fbd688369ecb0 to your computer and use it in GitHub Desktop.
Save sirkkalap/8deca22fbd688369ecb0 to your computer and use it in GitHub Desktop.
Ways to set up Docker container's timezone
$ docker run --rm busybox date
Thu Mar 20 04:42:02 UTC 2014
$ docker run --rm -v /etc/localtime:/etc/localtime busybox date
Thu Mar 20 14:42:20 EST 2014
$ FILE=$(mktemp) ; echo $FILE ; echo -e "Europe/Brussels" > $FILE ; docker run --rm -v $FILE:/etc/timezone -v /usr/share/zoneinfo/Europe/Brussels:/etc/localtime busybox date
/tmp/tmp.JwL2A9c50i
Thu Mar 20 05:42:26 CET 2014
@sirkkalap
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment