Dockerfile 1.2 KB

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