build(boot): Dockerfile support BOOT_OPTS env

This commit is contained in:
ReaJason
2025-02-23 16:45:27 +08:00
parent ede78f3efc
commit 43dc5ca398
2 changed files with 3 additions and 5 deletions
+2 -3
View File
@@ -9,12 +9,11 @@ LABEL authors="ReaJason<[email protected]>"
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
+1 -2
View File
@@ -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()
}