Skip to content

Instantly share code, notes, and snippets.

@mclark
Last active October 9, 2020 17:00
Show Gist options
  • Select an option

  • Save mclark/11434166 to your computer and use it in GitHub Desktop.

Select an option

Save mclark/11434166 to your computer and use it in GitHub Desktop.
set docker container time
$ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment