Open David-Development opened 6 years ago
Hello @David-Development,
emq-docker is alpine based and has two files related to timezone and localtime, these are located at:
Just map your host files to these and it should work: As an example:
$ docker run -it -e /etc/localtime:/etc/localtime -e /etc/TZ:/etc/TZ --name myemqtt emq:lastest
Depends on your host system, but the timezone file could also be named as /etc/timezone instead of /etc/TZ.
Hopefully this fixes your issue.
Regards, Ray
- [ ] BUG REPORT
- [x] FEATURE REQUEST
Missing feature
The EMQ dashboard displays the current time in different locations. Therefore being able to set the timezone would be a nice feature.
Workarounds
I forked the repo and added the
tzdata
package. This allows the user to set theTZ
environment flag (tested withdocker-compose
). Additional image size: 1.45MBChanges made: David-Development@d1a2b00
- [ ] BUG REPORT
- [x] FEATURE REQUEST
Missing feature
The EMQ dashboard displays the current time in different locations. Therefore being able to set the timezone would be a nice feature.
Workarounds
I forked the repo and added the
tzdata
package. This allows the user to set theTZ
environment flag (tested withdocker-compose
). Additional image size: 1.45MBChanges made: David-Development@d1a2b00
Hello @David-Development, in Dockerfile, line 6, COPY tmp/qemu-$QEMU_ARCH-stati* /usr/bin/
,how I find the tmp/qemu-$QEMU_ARCH-stati*
? thanks
你好 @RaymondMouthaan ,
我想在容器中使用CST0800的时间,使用如下命令启动,无效,请帮忙看一下,谢谢
docker run -d --name emqx31 -p 1883:1883 -p 8083:8083 -p 8883:8883 -p 8084:8084 -p 18083:18083 -e /etc/localtime:/etc/localtime -e /etc/TZ:/etc/TZ emqx/emqx:v3.1.0
@1069355234 "-e" in the docker run command sets the environment variable. Do you want to use "-v" to mount the file?
Missing feature
The EMQ dashboard displays the current time in different locations. Therefore being able to set the timezone would be a nice feature.
Workarounds
I forked the repo and added the
tzdata
package. This allows the user to set theTZ
environment flag (tested withdocker-compose
). Additional image size: 1.45MBChanges made: https://github.com/David-Development/emq-docker/commit/d1a2b00be6a4d0904ee2419b1d049422341c3643