12345678910111213141516171819202122232425 |
- FROM alpine:3.12
- ENV VERSION 1.0
- WORKDIR /apps/configs
- COPY releases/goNc /apps
- COPY configs/config.yaml /apps/configs
- COPY model/sql/initData.sql /apps/configs
- # 设置时区为上海
- RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- RUN echo 'Asia/Shanghai' >/etc/timezone
- # 挂载容器目录
- VOLUME ["/apps/configs"]
- # 设置编码
- ENV LANG C.UTF-8
- # 暴露端口
- EXPOSE 3001
- # 运行golang程序的命令
- ENTRYPOINT ["/apps/goNc"]
|