FROM golang:latest WORKDIR /app COPY . . RUN #go env -w GO111MODULE=off RUN apt-get update && apt-get install -y tzdata ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN go env -w GOPROXY=https://goproxy.cn,direct RUN go build -o staff-sync EXPOSE 18080 CMD ["./staff-sync"]