FROM golang:alpine as builder MAINTAINER zhixueyun ENV GOPROXY https://goproxy.cn/ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories RUN apk update && apk add tzdata make git WORKDIR /hx COPY . ./hx-admin-server RUN go env -w GOPRIVATE=git.cestong.com.cn RUN git config --global url."https://liubing:r4QQ3iATeoXT3CoV8Dwm@git.cestong.com.cn".insteadOf https://git.cestong.com.cn WORKDIR /hx/hx-admin-server RUN make build-prod FROM alpine COPY --from=builder /hx/hx-admin-server/bin/hx-admin-server /hx/hx-admin-server COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /etc/localtime EXPOSE 8000 WORKDIR /hx CMD ["/hx/hx-admin-server","server","-c", "/hx/config/settings.yml"]