FROM golang:1.12-alpine
ENV TZ Asia/Shanghai

# vi to vim
RUN apk add vim && \
  rm -rf /usr/bin/vi && \
  ln -s /usr/bin/vim /usr/bin/vi

RUN set -eux && \
    sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
    apk add --no-cache --update tzdata curl && \
    apk add --no-cache --update bash && \
    apk add --no-cache --update busybox-extras && \
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
    echo $TZ > /etc/timezone

COPY ./.vimrc /root
