Hi, I want to make sure that I understand how timezones work with Docker. Is it correct to say that configuring environment variable
TZ=<locale>, such as
TZ=UTC, is sufficient to apply a consistent timezone across the entire container, including any child processes and subsystems?
TZ work for:
- docker run?
- LXC, LXD?
Does this same process work for Windows images such as the Microsoft nano images? BSD containers?
Is there a special locale value for indicating that a container should match the host’s timezone? Or would that have to be manually applied?
How do OS-less containers behave, such as
FROM scratch containers with statically linked binaries? Correct to say that those would match the host’s timezone by default, and that
TZ=<locale> is sufficient to configure timezones for these kinds of containers as well?
Could we document the recommended procedure for customizing timezone in the main Docker manual? So far, I’ve only found scattered posts around Stack Overflow and Medium.
Do the library/ namespace images have consistent timezone behavior? E.g., are they all set to UTC, or perhaps EST, or perhaps all match the host timezone?