fuliqi
2024-10-29 a0877d9c0e2cf8678c025ecd88a5045d6e581e56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
config  config.js  DmJdbcDriver18.jar  dm.sql  Dockerfile  files  jdk17.tar  jdk8.tar  jxkg-3.9.0.jar  logs  nohup.out  simsun.ttc
[root@localhost java]# vi Dockerfile
# 基础镜像
FROM openjdk:17-alpine
# 作者
MAINTAINER xp
# 工作目录
WORKDIR /usr/local/java
# 复制宋体字体(路径相对于dockerfile的路径)
COPY simsun.ttc /usr/share/fonts/
# easyExcel字体
RUN apk add fontconfig && apk add --update ttf-dejavu && fc-cache --force
# 设置时区
ENV TZ=Asia/Shanghai
# 同步docker内部的时间
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
EXPOSE 8000
# 复制jar包到/user/local/java下
ARG JAR_FILE
ADD ${JAR_FILE} ./jxkg.jar
 
ENTRYPOINT ["nohup","java","-Dspring.profiles.active=prod","-Dspring.config.location=/usr/local/java/config/application.yml,/usr/local/java/config/application-prod.yml","-jar","/usr/local/java/jxkg-3.9.0.jar",">","/usr/local/java/jxkg.log","&>","&"]