FROM testhub.szjixun.cn:9043/public/golang:1.20-alpine AS builder

LABEL stage=gobuilder
ENV CGO_ENABLED 0
ENV GOPROXY https://goproxy.cn,direct
WORKDIR /build
COPY chain-dci-server /app/chain-dci-server

#FROM 172.16.100.99:9006/alpine
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
#RUN apk update --no-cache
#RUN apk add --no-cache ca-certificates
#RUN apk add --no-cache tzdata
FROM testhub.szjixun.cn:9043/public/self-alpine
COPY ./conf /app/conf

ENV TZ Asia/Shanghai
ENV MODE_ENV k8stest
WORKDIR /app
COPY --from=builder /app/chain-dci-server .
EXPOSE 20118
CMD ["/app/chain-dci-server"]
