go项目莫名重启

2020-01-02  本文已影响0人  _浅陌

今天go-lipstick项目游戏完总是重启,经过一番检测发现是时区没找到。

报错信息:

panic: time: missing Location in call to Date

目前需要在Dockerfile中添加如下配置:

ENV TIME_ZONE Asia/Chongqing

RUN apk add --no-cache tzdata \

&& echo"${TIME_ZONE}" > /etc/timezone \

&& ln-sf/usr/share/zoneinfo/${TIME_ZONE}/etc/localtime

上一篇 下一篇

猜你喜欢

热点阅读