timezone improvement
a1higgins-oss opened this issue · 0 comments
Hi,
I've just come across your docker for snips as I am looking to install a server based snips docker. I am new to docker, so not an expert, but...
...rather than manually setting up the timezone in the dockerfile, have you considered leaving it as UTC and then mounting the local servers /etc/localtime
file when you create the container. Some of the other containers (home assistant, appdaemon) I am running seem to follow this method. I've also added it to a few other containers (mosquitto, mariadb) and it correctly sets the timezone for the container.
So, in swarm mode, during service create
add:
--mount type=bind,source=/etc/localtime,destination=/etc/localtime,readonly
And if running standalone, then during run command/ container create, you'd need to add:
-v /etc/localtime:/etc/localtime:ro
Hope you find this useful.