dockerfile编写

master
fst1996 2023-09-17 16:18:28 +08:00
parent 3021982951
commit 10ae664337
2 changed files with 18 additions and 1 deletions

17
Dockerfile 100644
View File

@ -0,0 +1,17 @@
# 基础镜像
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
#暴露端口位置
EXPOSE 9300
# 挂载目录
VOLUME /home/logs/bawei-file
# 复制jar文件到docker内部
COPY /menghang-base-file-server/target/menghang-base-file-server.jar /home/app.jar
#工作目录 exec -it 进来默认就是这个目录
WORKDIR /home
# 启动java程序
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-jar","/home/app.jar"]

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!-- 日志存放路径 -->
<property name="log.path" value="logs/bawei-file" />
<property name="log.path" value="./logs/bawei-file" />
<!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />