Skip to content

Update dockerfile #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2018
Merged
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
32 changes: 32 additions & 0 deletions com.divit.spring-boot-simple-rest-api/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
4 changes: 1 addition & 3 deletions com.divit.spring-boot-simple-rest-api/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/target/
.project
.classpath
/target/
23 changes: 23 additions & 0 deletions com.divit.spring-boot-simple-rest-api/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.divit.spring-boot-simple-rest-api</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
4 changes: 2 additions & 2 deletions com.divit.spring-boot-simple-rest-api/DockerFile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:8-jdk-alpine
FROM openjdk:11
VOLUME /tmp
COPY /target/spring-boot-divit.jar app.jar
EXPOSE 8080
EXPOSE 8888
ENTRYPOINT ["java","-jar","/app.jar"]
13 changes: 13 additions & 0 deletions com.divit.spring-boot-simple-rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
<source>11</source>
<target>11</target>
</configuration>

</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>spring-boot-divit</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ private CandidatesUtil() {
public static List<Candidate> getCandidates() {
var candidateList = List.of(
new Candidate("John", 2, Set.of("java", "c#", "c++", "golang")),
new Candidate("David", 1, Set.of("javaScript", "c++")),
new Candidate("David", 1, Set.of("javascript", "c++")),
new Candidate("Diana", 4, Set.of("java", "python")),
new Candidate("June", 2, Set.of("ruby", "aws", "docker")));
new Candidate("June", 2, Set.of("ruby", "aws", "docker")),
new Candidate("April", 3, Set.of("python", "Erlang", "docker")));

return candidateList;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
server.port=8080
server.port=8888
logging.level.root=INFO