这篇文章主要介绍了如何把spring boot应用发布到Harbor,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
settings.xml配置
docker-hub admin Harbor12345
pom.xml配置
com.topcheer
docker
0.0.1-SNAPSHOT
docker
Demo project for Spring Boot
UTF-8
UTF-8
1.8
topcheer
192.168.180.105:1180
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-test
test
spring-milestones
Spring Milestones
https://repo.spring.io/milestone
docker
org.springframework.boot
spring-boot-maven-plugin
repackage
true
com.spotify
docker-maven-plugin
1.2.0
package
build
tag-image
package
tag
${docker.repostory}/${docker.image.prefix}/${project.artifactId}:1.0.1
${docker.repostory}/${docker.image.prefix}/${project.artifactId}:1.0.1
push-image
deploy
push
${docker.repostory}/${docker.image.prefix}/${project.artifactId}:1.0.1
docker-hub
${docker.repostory}
http://192.168.180.105:2375
true
true
src/main/docker
${docker.repostory}/${docker.image.prefix}/${project.artifactId}:1.0.1
1.0.2
${project.build.directory}
${project.build.finalName}.jar
true
运行命令
clean package docker:build -DpushImage -Dmaven.test.skip=true
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



