Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930
  1. # 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
  2. FROM bellsoft/liberica-openjdk-alpine:17.0.11-cds
  3. #FROM bellsoft/liberica-openjdk-alpine:21.0.3-cds
  4. #FROM findepi/graalvm:java17-native
  5. LABEL maintainer="Lion Li"
  6. RUN mkdir -p /ruoyi/server/logs \
  7. /ruoyi/server/temp \
  8. /ruoyi/skywalking/agent
  9. WORKDIR /ruoyi/server
  10. # 补全alpine镜像缺失字体问题
  11. RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
  12. RUN apk add fontconfig && apk add --update ttf-dejavu && fc-cache --force
  13. ENV SERVER_PORT=8080 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
  14. EXPOSE ${SERVER_PORT}
  15. ADD ./target/ruoyi-admin.jar ./app.jar
  16. ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
  17. # 应用名称 如果想区分集群节点监控 改成不同的名称即可
  18. #-Dskywalking.agent.service_name=ruoyi-server \
  19. #-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
  20. -XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
  21. -jar app.jar