First, the error information
Request error:post unix://localhost:80/build?t=springio/springboot-demo:500:http Internal Server Error
Ii. Solutions
Pom.xml file ${docker.image.prefix}/${project.artifactid} to Test/${project.artifactid}
Src/main/resource changed to./
Make sure Dockerfile is on the outermost layer of the project
Before modification
<plugin>
<groupId>com.spotify</groupId>
<artifactid>docker-maven-plugin</ artifactid>
<version>0.4.13</version>
<configuration>
<imagename>${ Docker.image.prefix}/${project.artifactid}</imagename>
<dockerdirectory>src/main/resource</ dockerdirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalname}. jar</include>
</resource>
</resources>
</configuration>
</ Plugin>
After modification
<plugin> <groupId>com.spotify</groupId> <artifactid>docker-maven-plugin</ artifactid> <version>0.4.13</version> <configuration> <imagename>mytest/${proje
Ct.artifactid}</imagename> <dockerDirectory>./</dockerDirectory> <resources> <resource> <targetPath>/</targetPath> <directory>${project.
Build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin>