FROM golang:latest as builder

WORKDIR /go/src/app  

COPY . . 
#设置时区
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
ENV youngee_env pro
RUN go env -w GO111MODULE=on

RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod tidy  
RUN go build .
EXPOSE 8300  
WORKDIR /go/src/app  
ENTRYPOINT ["./youngee_b_api"]