15 lines
596 B
Docker
15 lines
596 B
Docker
|
# 使用官方的OpenJDK基础镜像
|
||
|
#FROM openjdk:8-jre-slim
|
||
|
FROM openjdk:17
|
||
|
|
||
|
# 在镜像中创建一个目录用于存放我们的应用
|
||
|
VOLUME /tmp
|
||
|
|
||
|
# 将jar包添加到镜像中并更名为app.jar
|
||
|
ADD login/target/login.jar app.jar
|
||
|
# ADD shapelight-admin/src/main/resources/application.yml /config/application.yml
|
||
|
# ADD shapelight-admin/src/main/resources/application-dev.yml /config/application-de
|
||
|
|
||
|
# 在容器启动时运行jar包
|
||
|
# ENTRYPOINT ["java", "-jar", "app.jar", "--spring.config.location=/config/application.yml,/config/application-dev.yml"]
|
||
|
ENTRYPOINT ["java", "-jar", "app.jar"]
|