FROM openjdk:8-jre-alpine ARG JAR_FILE=target/springboot-docker-demo-1.0.jar ADD ${JAR_FILE} app.jar ENV JAVA_OPTS="" # ENTRYPOINT ["java","${JAVA_OPTS}","-jar","/app.jar"] ENTRYPOINT java ${JAVA_OPTS} -jar /app.jar docker run --name sbhello -p 8088:8088 -e JAVA_OPTS="-Xms256m -Xmx512m" sbhello:v1
springboot应用打docker镜像