timezones.adoc 939 B

123456789101112131415161718
  1. [#timezone]
  2. = Timezones
  3. OliveTin will obviously use the system time just like all other programs, but when running in a container, time works in a slightly unusual way.
  4. You may be used to using a TZ or TIMEZONE environment variable in your Linux container inages, but this is not a standard that works for all Linux distributions - it's mostly supported by Debain based containers. OliveTin's base container image is fedora-minimal, which deliberately does not include timezone data, to reduce storage space.
  5. To change the time in the OliveTin container, simply bind-mount the correct zone file;
  6. .Same as the container host
  7. ----
  8. docker create -v /etc/localtime:/etc/localtime -v /etc/OliveTin:/config --name OliveTin docker.io/jamesread/olivetin
  9. ----
  10. .Different timezone to the container host
  11. ----
  12. docker create -v /usr/share/zoneinfo/Japan:/etc/localtime -v /etc/OliveTin:/config --name OliveTin docker.io/jamesread/olivetin
  13. ----