voucher/Dockerfile

30 lines
761 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM registry.cn-chengdu.aliyuncs.com/lansexiongdi/build:1.22.2 AS builder
ENV GOCACHE /root/.cache/go-build
COPY . /src
WORKDIR /src
RUN make build
FROM registry.cn-chengdu.aliyuncs.com/lansexiongdi/work:v1
RUN echo 'http://mirrors.ustc.edu.cn/alpine/v3.5/main' > /etc/apk/repositories \
&& echo 'http://mirrors.ustc.edu.cn/alpine/v3.5/community' >>/etc/apk/repositories \
&& apk update && apk add tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
COPY --from=builder /src/bin /app
#删除config文件线上是通过挂载进来的
#RUN rm -rf /app/configs/config.yaml
WORKDIR /app
RUN mkdir /app/cert
VOLUME /data/conf
ENV ROCKETMQ_GO_LOG_LEVEL=error TZ=Asia/Shanghai
CMD ["./server"]