jenkins+docker deploy springboot project

jenkins+docker deploy springboot project

Add the Dockerfile file in the springboot root directory

FROM openjdk:8
VOLUME /tmp
ADD target/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar","--spring.profiles.active=prd"]

1. Create a new free style task

Insert image description here

2. Parameter configuration

  • Build by branch

Guess you like

Origin blog.csdn.net/caidingnu/article/details/129499224