FROM registry.cn-chengdu.aliyuncs.com/go_ls/go-zero:v1 AS builder LABEL stage=gobuilder ENV CGO_ENABLED 0 ENV GOPROXY https://goproxy.cn,direct WORKDIR /src COPY ../.. . RUN go mod tidy RUN go build -ldflags="-s -w" -o /src/cmd/api/yl cmd/api/yl.go FROM registry.cn-chengdu.aliyuncs.com/go_ls/alpha:v1 AS runtime COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt ENV TZ Asia/Shanghai COPY --from=builder /src /src RUN mkdir "/var/log/supervisor" ADD ./sh/startup.sh /opt/startup.sh RUN sed -i 's/\r//g' /opt/startup.sh ADD ./sh/supervisord.conf /etc/supervisord.conf WORKDIR /src EXPOSE 10102 #CMD ["sh","/opt/startup.sh"]