Setting Docker container timezone

nadinio

Dabbler
Joined
Jul 9, 2017
Messages
22
Is there an appropriate way to set the timezone for a running container? I've tried setting an environment variable TZ with the value America/New_York as I would in a docker compose script and it doesn't seem to change anything. Am I missing something?
 

ChickenSalad

Cadet
Joined
Jul 10, 2022
Messages
8
I'm also curious if there's a best-practice for this. I usually pass /etc/localtime and /etc/timezone read-only so that I can just keep timezones in sync with the host, but the recent host path validation changes to ix-chart recently now disallow this.
 
Top