File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 44 <modelVersion >4.0.0</modelVersion >
55 <groupId >org.springframework.samples</groupId >
66 <artifactId >springboot-petclinic</artifactId >
7- <version >1.4.0-SNAPSHOT </version >
7+ <version >1.4.0</version >
88 <parent >
99 <groupId >org.springframework.boot</groupId >
1010 <artifactId >spring-boot-starter-parent</artifactId >
1919 <java .version>1.7</java .version>
2020 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
2121 <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
22+ <docker .image.prefix>arey</docker .image.prefix>
2223
2324 <!-- Dates -->
2425 <jodatime-hibernate .version>1.3</jodatime-hibernate .version>
313314 </execution >
314315 </executions >
315316 </plugin >
317+ <plugin >
318+ <groupId >com.spotify</groupId >
319+ <artifactId >docker-maven-plugin</artifactId >
320+ <version >0.4.11</version >
321+ <configuration >
322+ <imageName >${docker.image.prefix} /${project.artifactId} </imageName >
323+ <dockerDirectory >src/main/docker</dockerDirectory >
324+ <resources >
325+ <resource >
326+ <targetPath >/</targetPath >
327+ <directory >${project.build.directory} </directory >
328+ <include >${project.build.finalName} .war</include >
329+ </resource >
330+ </resources >
331+ <forceTags >true</forceTags >
332+ <imageTags >
333+ <imageTag >${project.version} </imageTag >
334+ <imageTag >latest</imageTag >
335+ </imageTags >
336+ <useConfigFile >true</useConfigFile >
337+ </configuration >
338+ </plugin >
316339 </plugins >
317340 </build >
318341 <reporting >
Original file line number Diff line number Diff line change 1+ FROM openjdk:alpine
2+ MAINTAINER Antoine Rey <antoine.rey@free.fr>
3+ # Spring Boot application creates working directories for Tomcat by default
4+ VOLUME /tmp
5+ ADD petclinic.war petclinic.war
6+ RUN sh -c 'touch /petclinic.war'
7+ # To reduce Tomcat startup time we added a system property pointing to "/dev/urandom" as a source of entropy.
8+ ENTRYPOINT ["java" ,"-Djava.security.egd=file:/dev/./urandom" ,"-jar" ,"/petclinic.war" ]
You can’t perform that action at this time.
0 commit comments