من یک پروژه spring-boot ی دارم که میخوام jar فایلی که تولید میشه رو تویه یک docker image بزارم تا مرحله دانلود کردن Image هم جلو میره و دانلود میکنه اما بعدش به مشکل میخوره
قسمت Maven build مربوط به پلاگین fabric8
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.14.0</version>
<configuration>
<!--<dockerHost>http://127.0.0.1:2375</dockerHost>-->
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<verbose>true</verbose>
<images>
<image>
<alias>some-service-name-1</alias>
<name>/${docker.image.prefix}/${docker.image.name}</name>
<build>
<assembly>
<descriptorRef>artifact</descriptorRef>
<dockerFileDir>${project.basedir}/src/main/docker/</dockerFileDir>
</assembly>
</build>
<run>
<namingStrategy>alias</namingStrategy>
<envPropertyFile>LocalEnv</envPropertyFile>
<net>pod-network</net>
<ports>
<port>8001:7199</port>
<port>8000:8080</port>
</ports>
</run>
</image>
</images>
</configuration>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</configuration>
</plugin>
</plugins>
</build>
فایل dockerfile
FROM openjdk
VOLUME /tmp
ADD maven/spring-boot-docker-0.0.1-SNAPSHOT.jar myapp.jar
RUN sh -c 'touch /myapp.jar'
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar","/myapp.jar"]
Maven Command : mvn clean package docker:build
و خطایی که میده
I/O exception (java.io.IOException) caught when processing request to {}->unix://127.0.0.1:1: Connection reset by peer
[INFO] Retrying request to {}->unix://127.0.0.1:1
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://127.0.0.1:1: Connection reset by peer
[INFO] Retrying request to {}->unix://127.0.0.1:1
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://127.0.0.1:1: Connection reset by peer
[INFO] Retrying request to {}->unix://127.0.0.1:1
[ERROR] DOCKER> Connection reset by peer
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.124 s
[INFO] Finished at: 2019-01-19T13:12:55+03:30
[INFO] Final Memory: 29M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.14.0:build (default-cli) on project spring-boot-web: Unable to build image [/springframework/springbootdocker] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:docker-maven-plugin:0.14.0:build (default-cli) on project spring-boot-web: Unable to build image [/springframework/springbootdocker]