成都网站建设设计

将想法与焦点和您一起共享

怎么把springboot应用发布到Harbor

小编给大家分享一下怎么把spring boot应用发布到Harbor,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

成都创新互联2013年开创至今,先为都安等服务建站,都安等地企业,进行企业商务咨询服务。为都安企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

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

怎么把spring boot应用发布到Harbor

看完了这篇文章,相信你对“怎么把spring boot应用发布到Harbor”有了一定的了解,如果想了解更多相关知识,欢迎关注创新互联行业资讯频道,感谢各位的阅读!


分享题目:怎么把springboot应用发布到Harbor
URL网址:http://chengdu.cdxwcx.cn/article/jedhpj.html