Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM openjdk:8-jre
MAINTAINER Divyanshu kumar

ENTRYPOINT ["/usr/bin/java", "-jar", "/usr/share/myservice/demo.jar"]

# Add Maven dependencies (not shaded into the artifact; Docker-cached)
#ADD target/lib /usr/share/myservice/lib
# Add the service itself
ARG JAR_FILE=demo-0.0.1-SNAPSHOT.jar

ADD target/${JAR_FILE} /usr/share/myservice/demo.jar

EXPOSE 8080
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
[![Build Status](https://semaphoreci.com/api/v1/monuk18/demo/branches/master/badge.svg)](https://semaphoreci.com/monuk18/demo)

# Employee REST sevice
springboot Employee REST
[![Build Status](https://semaphoreci.com/api/v1/monuk18/demo/branches/test/badge.svg)](https://semaphoreci.com/monuk18/demo)
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,28 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<configuration>
<!-- replace `divyankumar` with your docker id-->
<repository>divyankumar/spring-boot-demo</repository>
<tag>${project.version}</tag>
<buildArgs>
<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
</configuration>
<executions>
<execution>
<id>default</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down