Dockerfile 453 B

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