File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
1
FROM eclipse-temurin:17-jre@sha256:0adcf8486107fbd706de4b4fdde64c2d2e3ead4c689b2fb7ae4947010e1f00b4
2
2
3
- RUN addgroup spring
4
- RUN useradd -g spring spring
3
+ RUN addgroup spring&& useradd -g spring spring
5
4
USER spring:spring
6
5
7
6
# https://github.com/microsoft/ApplicationInsights-Java/releases
8
- ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.19/applicationinsights-agent-3.4.19.jar /applicationinsights-agent.jar
7
+ ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.6.0/applicationinsights-agent-3.6.0.jar /applicationinsights-agent.jar
8
+
9
9
COPY --chown=spring:spring docker/applicationinsights.json ./applicationinsights.json
10
10
11
11
EXPOSE 8080
Original file line number Diff line number Diff line change 9
9
{
10
10
"telemetryType" : " exception" ,
11
11
"percentage" : 100
12
+ },
13
+ {
14
+ "telemetryType" : " request" ,
15
+ "percentage" : 100
12
16
}
13
17
]
14
18
}
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- version =$( cat META-INF/MANIFEST.MF | grep -oP ' Spring-Boot-Version: \K[\d.]+ ' )
4
- version_major= ${version : 0 : 1}
3
+ spring_boot_version =$( cat ./ META-INF/MANIFEST.MF | grep ' Spring-Boot-Version:' | cut -d ' ' -f 2 )
4
+ major_version= $( echo " $spring_boot_version " | cut -d ' . ' -f 1 )
5
5
6
- # Check if the version_major is 3
7
- if [[ " $version_major " == " 3" ]] ; then
8
- exec java -javaagent:/applicationinsights-agent.jar ${JAVA_OPTS} org.springframework.boot.loader.launch.JarLauncher " $@ "
6
+ # Check if the major_version is 3
7
+ if [ " $major_version " -eq " 3" ] ; then
8
+ exec java -javaagent:/applicationinsights-agent.jar ${JAVA_OPTS} org.springframework.boot.loader.launch.JarLauncher " $@ "
9
9
else
10
10
exec java -javaagent:/applicationinsights-agent.jar ${JAVA_OPTS} org.springframework.boot.loader.JarLauncher " $@ "
11
11
fi
You can’t perform that action at this time.
0 commit comments