deploy: exec java in container entrypoint

This commit is contained in:
lingniu
2026-07-01 12:04:04 +08:00
parent 2d65a2555f
commit a76cd3a8d6
2 changed files with 10 additions and 1 deletions

View File

@@ -47,6 +47,15 @@ class PortainerComposeResourceLimitsTest {
.contains("JAVA_OPTS: ${JAVA_OPTS:---sun-misc-unsafe-memory-access=allow -XX:+UseZGC -XX:MaxRAMPercentage=75}");
}
@Test
void dockerEntrypointExecsJavaForSignalHandling() throws IOException {
String dockerfile = Files.readString(repositoryRoot().resolve("Dockerfile"));
assertThat(dockerfile)
.contains("ENTRYPOINT [\"sh\", \"-c\", \"exec java $JAVA_OPTS -jar /app/app.jar\"]")
.doesNotContain("\"java $JAVA_OPTS -jar /app/app.jar\"");
}
@Test
void gb32960ComposeExposesBothPlatformAccountsWithoutSecrets() throws IOException {
String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml"));