From 89c19bbcfeceb925520d614dcbe21b74c277fa1c Mon Sep 17 00:00:00 2001 From: gewuyou Date: Fri, 9 May 2025 10:45:08 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=9B=B4=E6=96=B0=20Docker=20?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=9E=84=E5=BB=BA=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 llmx-core-service 和 llmx-impl-bailian 项目添加自定义 entrypoint - 安装 netcat-openbsd 并使用 /entrypoint.sh 启动应用 -指定 Nacos 服务器地址和端口 - 优化镜像构建过程,提高启动速度和可靠性 --- build.gradle.kts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a22d08a..9aef9e6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -119,14 +119,26 @@ subprojects { ports = listOf("9002") environment = mapOf("SPRING_PROFILES_ACTIVE" to env) imageName = "llmx-core-service" -// paths = listOf(File(rootProject.projectDir, "scripts").absolutePath) + paths = listOf(File(rootProject.projectDir, "scripts").absolutePath) + entrypoint = listOf( + "/bin/sh", "-c", + "apt-get update && apt-get install -y netcat-openbsd && " + + "/entrypoint.sh -d llmx-nacos:8848 -c " + + "'java -cp $( cat /app/jib-classpath-file ) $( cat /app/jib-main-class-file )'" + ) } project { projectName = "llmx-impl-bailian" ports = listOf("9003") environment = mapOf("SPRING_PROFILES_ACTIVE" to env) imageName = "llmx-impl-bailian" -// paths = listOf(File(rootProject.projectDir, "scripts").absolutePath) + paths = listOf(File(rootProject.projectDir, "scripts").absolutePath) + entrypoint = listOf( + "/bin/sh", "-c", + "apt-get update && apt-get install -y netcat-openbsd && " + + "/entrypoint.sh -d llmx-nacos:8848 -c " + + "'java -cp $( cat /app/jib-classpath-file ) $( cat /app/jib-main-class-file )'" + ) } } }