DocumentCheck_system/Dockerfile
2024-08-08 19:02:01 +08:00

22 lines
759 B
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

#基于jdk8镜像进行构建创建的镜像已经配置好java环境
FROM openjdk:8
#上述的pom中配置的JAR_FILE将会传入到该参数
#也可以在这里直接配置 ARG JAR_FILE=/target/web-1.0.jar
#用于配置spingboot应用maven打包生成的jar文件
ARG JAR_FILE
#在镜像中创建一个工作目录
RUN mkdir /worker
#将jar文件复制到工作目录中
add ${JAR_FILE} /worker
#暴露镜像的端口8452其他端口不开放
expose 8089
#镜像启动时执行的命令,配置多条仅执行最后一条
#这里配置启动jar文件: java -jar /worker/web-1.0.jar
entrypoint ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/springbootmybatis-1.0.jar"]
# entrypoint ["java","-jar","/worker/springbootmybatis-1.0.jar"]