Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. # FROM alpine
  2. # RUN echo -e https://mirrors.ustc.edu.cn/alpine/v3.15/main > /etc/apk/repositories \
  3. # && cat /etc/apk/repositories \
  4. # # 设置时区为上海
  5. # && apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  6. # && echo "Asia/Shanghai" > /etc/timezone \
  7. # && apk del tzdata \
  8. # # 解决apline 运行编译后的执行文件 not found错误
  9. # # 由于alpine镜像使用的是musl libc而不是gnu libc,/lib64/ 是不存在的。但他们是兼容的,可以创建个软连接
  10. # && mkdir /lib64 \
  11. # && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 \
  12. FROM registry.cn-chengdu.aliyuncs.com/infish/alpine
  13. # https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc
  14. RUN echo -e https://mirrors.ustc.edu.cn/alpine/v3.15/main > /etc/apk/repositories \
  15. && cat /etc/apk/repositories \
  16. # 设置时区为上海
  17. && apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  18. && echo "Asia/Shanghai" > /etc/timezone \
  19. && apk del tzdata \
  20. && mkdir -p /root/baishuihu
  21. WORKDIR /root/baishuihu
  22. ADD app.yaml app.yaml
  23. ADD images images
  24. ADD files files
  25. ADD baishuihu-service baishuihu-service
  26. EXPOSE 8101
  27. ENTRYPOINT ["./baishuihu-service"]