Skip to content

Commit a909bef

Browse files
committed
added Docker
1 parent 949426c commit a909bef

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM amazoncorretto:8-alpine-jdk
2+
3+
EXPOSE 8080
4+
5+
COPY target/rest-api-example.jar .
6+
7+
ENTRYPOINT [ \
8+
"java", \
9+
"-Xmx2G", \
10+
"-jar", "rest-api-example.jar" \
11+
]

compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
rest-api-example:
3+
build: .
4+
ports:
5+
- "8080:8080"

pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,30 @@
6161

6262

6363
<build>
64+
<finalName>rest-api-example</finalName>
6465
<plugins>
6566
<plugin>
6667
<groupId>org.apache.maven.plugins</groupId>
6768
<artifactId>maven-compiler-plugin</artifactId>
6869
<version>3.8.1</version>
6970
<inherited>true</inherited>
7071
<configuration>
71-
<release>1.8</release>
72+
<source>1.8</source>
73+
<target>1.8</target>
7274
</configuration>
7375
</plugin>
76+
<plugin>
77+
<groupId>org.springframework.boot</groupId>
78+
<artifactId>spring-boot-maven-plugin</artifactId>
79+
<version>${version.spring}</version>
80+
<executions>
81+
<execution>
82+
<goals>
83+
<goal>repackage</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
7488
</plugins>
7589
</build>
7690

0 commit comments

Comments
 (0)