Skip to content

Commit 2728954

Browse files
authored
Merge pull request #113152 from trask/add-docker-entrypoint-instructions
Add Docker entrypoint instructions
2 parents 5ecc352 + ad9c17a commit 2728954

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

articles/azure-monitor/app/java-standalone-arguments.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,25 @@ Configure [App Services](https://docs.microsoft.com/azure/app-service/configure-
1616

1717
## Spring Boot
1818

19-
Add the JVM arg `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` somewhere before `-jar <myapp.jar>`, for example:
19+
Add the JVM arg `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` somewhere before `-jar`, for example:
2020

2121
```
2222
java -javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar -jar <myapp.jar>
2323
```
2424

25-
> [!NOTE]
26-
> Args placed after `-jar <myapp.jar>` are passed to the app as program args.
25+
## Spring Boot via Docker entry point
2726

27+
If you are using the *exec* form, add the parameter `"-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar"` to the parameter list somewhere before the `"-jar"` parameter, for example:
28+
29+
```
30+
ENTRYPOINT ["java", "-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar", "-jar", "<myapp.jar>"]
31+
```
32+
33+
If you are using the *shell* form, add the JVM arg `-javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar` somewhere before `-jar`, for example:
34+
35+
```
36+
ENTRYPOINT java -javaagent:path/to/applicationinsights-agent-3.0.0-PREVIEW.jar -jar <myapp.jar>
37+
```
2838

2939
## Tomcat 8 (Linux)
3040

0 commit comments

Comments
 (0)