AlpineLinux时区问题

直接 dockerfile 里添加安装 tzdata

Copy
FROM alpine:3.7

MAINTAINER Rethink
#更新Alpine的软件源为国内（清华大学）的站点，因为从默认官源拉取实在太慢了。。。
# RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main/" > /etc/apk/repositories

RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash \
bash-doc \
bash-completion \
# timezone
tzdata \
&& rm -rf /var/cache/apk/* \
&& /bin/bash

RUN apk update \
&& apk upgrade \
&& apk add -U
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime