supervision-edh/deploy/Dockerfile

20 lines
423 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用精简基础镜像不包含JDK
FROM debian:bullseye-slim
# 创建目录并挂载宿主机JDK
RUN mkdir -p /usr/local/jdk
VOLUME /usr/local/jdk
# 设置环境变量指向宿主机JDK
ENV JAVA_HOME=/usr/local/jdk
ENV PATH=$JAVA_HOME/bin:$PATH
# 复制Spring Boot应用
WORKDIR /app
COPY supervision-edh-1.0.0.jar /app/edh.jar
# 暴露端口
EXPOSE 1788
# 启动命令
ENTRYPOINT ["java", "-jar", "edh.jar"]