Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

timezone improvement #5

@a1higgins-oss

Description

@a1higgins-oss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions