使用Docker部署Springboot项目

首先在springboot项目的pom.xml中配置docker的maven插件

<plugin>
<groupId>com.spotifygroupId>
<artifactId>docker-maven-pluginartifactId>
<version>0.4.3version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}imageName>
<dockerDirectory>src/main/dockerdockerDirectory>
<resources>
<resource>
<targetPath>/targetPath>
<directory>${project.build.directory}directory>
<include>${project.build.finalName}.jarinclude>
resource>
resources>
configuration>
plugin>

 

你可能感兴趣的:(使用Docker部署Springboot项目)