Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Add timezone in to Dockerfile #594

Closed
kis87988 opened this issue Jun 20, 2017 · 2 comments
Closed

[enhancement] Add timezone in to Dockerfile #594

kis87988 opened this issue Jun 20, 2017 · 2 comments

Comments

@kis87988
Copy link
Contributor

kis87988 commented Jun 20, 2017

Right now, we can not declare a environment (ENV) varialbe to set timezone
My idea is:

  1. apk add tzdata
  2. set ENV localTime America/Los_Angeles
  3. RUN cp /usr/share/zoneinfo/${localTime} /etc/localtime
    but I could not figure it out how to make it run in the dockerfile

The alternating method is:
create container first by docker pull/docker run and then docker enter to the container.
do the following:

  1. apk add -U tzdata
  2. cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Hope someone can make it into dockerfile.

@huan
Copy link
Member

huan commented Jun 21, 2017

Thanks for purposing!

I believe setting timezone is a necessary feature that Wechaty Docker Image should support.

@huan
Copy link
Member

huan commented Nov 5, 2017

Support to set TZ for timezone at Wechaty version 0.13.13 or above at: 61c277c

Usage:

docker run -e TZ='Asia/Shanghai' zixia/wechaty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants