非远程读取修改deepseek
Some checks failed
构建并部署 Spring Boot 应用 / build-and-deploy (push) Failing after 1m30s
Some checks failed
构建并部署 Spring Boot 应用 / build-and-deploy (push) Failing after 1m30s
This commit is contained in:
39
pom.xml
39
pom.xml
@@ -169,11 +169,9 @@
|
||||
<artifactId>jib-maven-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<configuration>
|
||||
<!-- 【核心修正】基础镜像配置 -->
|
||||
<from>
|
||||
<image>openjdk:17-jdk-slim</image>
|
||||
<image>docker://openjdk:17-jdk-slim</image> <!-- 关键修改1: 使用 docker:// 前缀明确指向本地Daemon -->
|
||||
</from>
|
||||
<!-- 【核心修正】目标镜像配置 -->
|
||||
<to>
|
||||
<image>light-delivery-app</image>
|
||||
<tags>
|
||||
@@ -181,7 +179,6 @@
|
||||
<tag>${project.version}</tag>
|
||||
</tags>
|
||||
</to>
|
||||
<!-- 【核心修正】容器运行配置 -->
|
||||
<container>
|
||||
<ports>
|
||||
<port>8080</port>
|
||||
@@ -192,29 +189,25 @@
|
||||
</environment>
|
||||
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
|
||||
<mainClass>com.light.delivery.LightApplication</mainClass>
|
||||
<!-- 可选:添加JVM参数以优化内存 -->
|
||||
<jvmFlags>
|
||||
<jvmFlag>-Djava.security.egd=file:/dev/./urandom</jvmFlag>
|
||||
<jvmFlag>-Xms256m</jvmFlag>
|
||||
<jvmFlag>-Xmx512m</jvmFlag>
|
||||
</jvmFlags>
|
||||
</container>
|
||||
|
||||
<!-- 【最关键修正】离线模式与本地镜像策略 -->
|
||||
<!-- 1. 强制启用离线模式,禁止所有网络操作 -->
|
||||
<!-- 关键修改2: 强化离线模式配置 -->
|
||||
<offline>true</offline>
|
||||
<!-- 2. 明确告知Jib直接从本地Docker守护进程获取基础镜像,不进行任何远程检查 -->
|
||||
<useCurrentTimestamp>true</useCurrentTimestamp>
|
||||
|
||||
<!-- 【移除所有可能引发网络检查的冲突配置】 -->
|
||||
<!-- 删除以下行:
|
||||
<allowInsecureRegistries>true</allowInsecureRegistries>
|
||||
<pullParent>false</pullParent>
|
||||
<containerizingMode>packaged</containerizingMode>
|
||||
<outputPaths>...<outputPaths>
|
||||
-->
|
||||
|
||||
</configuration>
|
||||
<!-- 关键修改3: 为jib目标绑定离线模式配置 -->
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<jib.allowInsecureRegistries>true</jib.allowInsecureRegistries>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
Reference in New Issue
Block a user