File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 1
- FROM eclipse-temurin:17-jdk-focal
1
+ FROM amazoncorretto:17-alpine as corretto-jdk
2
+
3
+ # required for strip-debug to work
4
+ RUN apk add --no-cache binutils
5
+
6
+ # Build small JRE image
7
+ RUN jlink \
8
+ --add-modules ALL-MODULE-PATH \
9
+ --strip-debug \
10
+ --no-man-pages \
11
+ --no-header-files \
12
+ --compress=2 \
13
+ --output /jre
14
+
15
+ FROM alpine:latest
16
+ ENV JAVA_HOME=/jre
17
+ ENV PATH="${JAVA_HOME}/bin:${PATH}"
18
+
19
+ COPY --from=corretto-jdk /jre $JAVA_HOME
2
20
3
21
ARG JAR_FILE
4
22
ARG SPRING_BOOT_VERSION
@@ -7,8 +25,8 @@ LABEL org.opencontainers.image.authors="Oliver Sahner <
[email protected] >"
7
25
LABEL org.springframework.boot="${SPRING_BOOT_VERSION}"
8
26
9
27
RUN mkdir /opt/app
10
- RUN addgroup --system --gid 1001 spring
11
- RUN adduser --system --no-create-home --uid 1001 --gid 1001 spring
28
+ RUN addgroup -g 1001 -S spring
29
+ RUN adduser -u 1001 -S spring -G spring
12
30
RUN chown spring:spring /opt/app
13
31
USER spring
14
32
Original file line number Diff line number Diff line change @@ -33,5 +33,5 @@ if [[ $p -eq 1 ]]; then
33
33
PLATFORM=" linux/amd64"
34
34
fi
35
35
echo -e " ${color_light_cyan} + for platform ${PLATFORM}${color_restore} "
36
- docker build --build-arg JAR_FILE=" ${JAR_FILE} " --build-arg SPRING_BOOT_VERSION=" ${SPRING_BOOT_VERSION} " \
36
+ DOCKER_BUILDKIT=1 docker build --build-arg JAR_FILE=" ${JAR_FILE} " --build-arg SPRING_BOOT_VERSION=" ${SPRING_BOOT_VERSION} " \
37
37
--platform=${PLATFORM} --no-cache --pull --rm -f Dockerfile -t " ${GROUPID} /${ARTIFACTID} :${VERSION} " .
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<groupId >org.springframework.boot</groupId >
7
7
<artifactId >spring-boot-starter-parent</artifactId >
8
- <version >3.0.2 </version >
8
+ <version >3.0.4 </version >
9
9
<relativePath /> <!-- lookup parent from repository -->
10
10
</parent >
11
11
12
12
<groupId >osahner</groupId >
13
13
<artifactId >kotlin-spring-boot-rest-jpa-jwt-starter</artifactId >
14
- <version >0.9.1 -SNAPSHOT</version >
14
+ <version >0.9.2 -SNAPSHOT</version >
15
15
<packaging >jar</packaging >
16
16
17
17
<name >kotlin spring-boot 2 rest/jpa/jwt starter</name >
22
22
<project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
23
23
24
24
<java .version>17</java .version>
25
- <kotlin .version>1.8.0 </kotlin .version>
25
+ <kotlin .version>1.8.10 </kotlin .version>
26
26
27
27
<dockerfile-maven .version>1.4.13</dockerfile-maven .version>
28
28
<jacoco-maven-plugin .version>0.8.7</jacoco-maven-plugin .version>
You can’t perform that action at this time.
0 commit comments