diff --git a/pom.xml b/pom.xml
index 06741b463..880e7bef6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.springframework.samples
springboot-petclinic
- 1.4.0-SNAPSHOT
+ 1.4.0
org.springframework.boot
spring-boot-starter-parent
@@ -19,6 +19,7 @@
1.7
UTF-8
UTF-8
+ arey
1.3
@@ -313,6 +314,28 @@
+
+ com.spotify
+ docker-maven-plugin
+ 0.4.11
+
+ ${docker.image.prefix}/${project.artifactId}
+ src/main/docker
+
+
+ /
+ ${project.build.directory}
+ ${project.build.finalName}.war
+
+
+ true
+
+ ${project.version}
+ latest
+
+ true
+
+
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
new file mode 100644
index 000000000..cbbf16299
--- /dev/null
+++ b/src/main/docker/Dockerfile
@@ -0,0 +1,8 @@
+FROM openjdk:alpine
+MAINTAINER Antoine Rey
+# Spring Boot application creates working directories for Tomcat by default
+VOLUME /tmp
+ADD petclinic.war petclinic.war
+RUN sh -c 'touch /petclinic.war'
+# To reduce Tomcat startup time we added a system property pointing to "/dev/urandom" as a source of entropy.
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/petclinic.war"]