添加dockerFile文件 + 打包jar包
parent
afcaaaed10
commit
9c931b6646
|
@ -0,0 +1,20 @@
|
|||
FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:17-8.6
|
||||
|
||||
|
||||
# 暴露端口号
|
||||
EXPOSE 9999/tcp
|
||||
|
||||
|
||||
# 挂载目录位置
|
||||
VOLUME /home/logs/fate-launch
|
||||
|
||||
#构造 复制外部文件到docker 内部
|
||||
COPY fate-launch-server/target/fate-launch-server.jar /home/app.jar
|
||||
|
||||
# 工作目录 exec -it 进来就是默认这个目录1gitn1
|
||||
WORKDIR /home
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > .etc.timezone
|
||||
|
||||
# 启动java程序
|
||||
CMD ["java","-Dfile.encoding=UTF-8","-jar","/home/app.jar"]
|
|
@ -63,5 +63,20 @@
|
|||
<version>8.0.33</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue