Skip to content

Commit 84e308a

Browse files
committed
Use adoptopenjdk base image
1 parent ee6e4c9 commit 84e308a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ endif::env-github[]
6767
The Docker build has two stages:
6868

6969
. Building the Maven project inside a `maven:3.6.3-openjdk-11` container
70-
. Copying the output of the build in a `openjdk:11-slim` container and configuring the entry point
70+
. Copying the output of the build in a `adoptopenjdk:11-jre-hotspot` container and configuring the entry point
7171

7272
The benefits of this approach are:
7373

@@ -128,7 +128,7 @@ endif::env-github[]
128128
The Docker build has two stages:
129129

130130
. Building the Gradle project inside a `gradle:6.8.3-jdk11` container
131-
. Copying the output of the build in a `openjdk:11-slim` container and configuring the entry point
131+
. Copying the output of the build in a `adoptopenjdk:11-jre-hotspot` container and configuring the entry point
132132

133133
The benefits of this approach are:
134134

docker-gradle/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY . /project/
55
RUN gradle assemble --no-daemon
66

77
# 2nd Docker build stage: copy builder output and configure entry point
8-
FROM openjdk:11-slim
8+
FROM adoptopenjdk:11-jre-hotspot
99
ENV APP_DIR /application
1010
ENV APP_FILE container-uber-jar.jar
1111

@@ -15,4 +15,4 @@ WORKDIR $APP_DIR
1515
COPY --from=builder /project/build/libs/*-fat.jar $APP_DIR/$APP_FILE
1616

1717
ENTRYPOINT ["sh", "-c"]
18-
CMD ["exec", "java", "-jar", "$APP_FILE"]
18+
CMD ["exec java -jar $APP_FILE"]

docker-maven/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY . /project/
55
RUN mvn package -DskipTests -B
66

77
# 2nd Docker build stage: copy builder output and configure entry point
8-
FROM openjdk:11-slim
8+
FROM adoptopenjdk:11-jre-hotspot
99
ENV APP_DIR /application
1010
ENV APP_FILE container-uber-jar.jar
1111

0 commit comments

Comments
 (0)