From 43dc5ca3986df95d4e198b5d2507520d42078fc3 Mon Sep 17 00:00:00 2001 From: ReaJason Date: Sun, 23 Feb 2025 16:45:27 +0800 Subject: [PATCH] build(boot): Dockerfile support BOOT_OPTS env --- boot/Dockerfile | 5 ++--- boot/build.gradle | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/boot/Dockerfile b/boot/Dockerfile index 598d3c6f..4c138442 100644 --- a/boot/Dockerfile +++ b/boot/Dockerfile @@ -9,12 +9,11 @@ LABEL authors="ReaJason" WORKDIR /app COPY build/libs/boot-${VERSION}.jar app.jar -ENV JAVA_OPTS="" \ - INTER_JAVA_OPTS="\ +ENV INTERNAL_JAVA_OPTS="\ --add-opens=java.base/java.util=ALL-UNNAMED \ --add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.trax=ALL-UNNAMED \ --add-opens=java.xml/com.sun.org.apache.xalan.internal.xsltc.runtime=ALL-UNNAMED" EXPOSE 8080 -ENTRYPOINT java $JAVA_OPTS $INTER_JAVA_OPTS -jar app.jar +ENTRYPOINT java $JAVA_OPTS $INTERNAL_JAVA_OPTS -jar app.jar $BOOT_OPTS diff --git a/boot/build.gradle b/boot/build.gradle index 6635533f..9d5fbcec 100644 --- a/boot/build.gradle +++ b/boot/build.gradle @@ -44,7 +44,6 @@ dependencies { implementation(project(":deserialize")) { exclude group: 'commons-logging', module: 'commons-logging' } - implementation 'org.apache.bcel:bcel' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation('org.springframework.boot:spring-boot-starter-web') { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' @@ -58,6 +57,6 @@ dependencies { testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } -tasks.named('test') { +test { useJUnitPlatform() }