fix:修改docker打印插件
This commit is contained in:
parent
6de466392a
commit
143b85942f
44
pom.xml
44
pom.xml
|
|
@ -46,6 +46,11 @@
|
||||||
<transmittable-thread-local.version>2.12.2</transmittable-thread-local.version>
|
<transmittable-thread-local.version>2.12.2</transmittable-thread-local.version>
|
||||||
<dockerfile.maven.plugin.version>1.4.13</dockerfile.maven.plugin.version>
|
<dockerfile.maven.plugin.version>1.4.13</dockerfile.maven.plugin.version>
|
||||||
<compiler.maven.plugin.version>3.10.1</compiler.maven.plugin.version>
|
<compiler.maven.plugin.version>3.10.1</compiler.maven.plugin.version>
|
||||||
|
|
||||||
|
|
||||||
|
<docker.url>registry.cn-guangzhou.aliyuncs.com</docker.url>
|
||||||
|
<docker.space>ry_base</docker.space>
|
||||||
|
<docker.warehouse>ry</docker.warehouse>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
|
|
@ -349,5 +354,44 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>local</id>
|
||||||
|
<properties>
|
||||||
|
<profiles.active>local</profiles.active>
|
||||||
|
<jib.key>dockerBuild</jib.key> <!-- local环境下 dockerBuild 表示将镜像打包到本地docker环境-->
|
||||||
|
<jib.skip>true</jib.skip> <!--local环境下 跳过jib打包镜像操作 -->
|
||||||
|
<jib.docker.version>${project.version}</jib.docker.version>
|
||||||
|
</properties>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>develop</id>
|
||||||
|
<properties>
|
||||||
|
<profiles.active>develop</profiles.active>
|
||||||
|
<jib.key>build</jib.key>
|
||||||
|
<jib.docker.version>${project.version}</jib.docker.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>test</id>
|
||||||
|
<properties>
|
||||||
|
<profiles.active>test</profiles.active>
|
||||||
|
<jib.key>build</jib.key>
|
||||||
|
<jib.docker.version>latest</jib.docker.version>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>product</id>
|
||||||
|
<properties>
|
||||||
|
<profiles.active>product</profiles.active>
|
||||||
|
<jib.key>build</jib.key><!-- 生产环境下 hubuild 表示将镜像打包到远程服务器 如阿里云-->
|
||||||
|
<jib.docker.tag></jib.docker.tag>
|
||||||
|
<jib.docker.version>${jib.docker.tag}.RELEASE</jib.docker.version>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -79,10 +79,20 @@
|
||||||
<image>openjdk:8-jre</image>
|
<image>openjdk:8-jre</image>
|
||||||
</from>
|
</from>
|
||||||
<to>
|
<to>
|
||||||
<image>${project.name}/${project.artifactId}:${project.version}</image>
|
<!-- 如果是阿里云的容器镜像仓库,则使用容器的配置 前缀/命名空间/仓库名 -->
|
||||||
|
<image>${docker.url}/${docker.space}/${docker.warehouse}</image>
|
||||||
|
<tags>
|
||||||
|
<!--指定包名-->
|
||||||
|
<image>${artifactId}</image>
|
||||||
|
<!--版本号-->
|
||||||
|
<tag>${project.version}</tag>
|
||||||
|
</tags>
|
||||||
</to>
|
</to>
|
||||||
<!--容器相关的属性-->
|
<!--容器相关的属性-->
|
||||||
<container>
|
<container>
|
||||||
|
<!-- springboot项目的入口类 -->
|
||||||
|
<!-- <mainClass>com/ruoyi/auth/RuoYiAuthApplication</mainClass>-->
|
||||||
|
<!-- <useCurrentTimestamp>true</useCurrentTimestamp>-->
|
||||||
<!--jvm内存参数-->
|
<!--jvm内存参数-->
|
||||||
<jvmFlags>
|
<jvmFlags>
|
||||||
<jvmFlag>-Xms1g</jvmFlag>
|
<jvmFlag>-Xms1g</jvmFlag>
|
||||||
|
|
@ -92,8 +102,28 @@
|
||||||
<ports>
|
<ports>
|
||||||
<port>12200</port>
|
<port>12200</port>
|
||||||
</ports>
|
</ports>
|
||||||
|
<!--使用该参数将镜像的创建时间与系统时间一致-->
|
||||||
|
<!--<useCurrentTimestamp>true</useCurrentTimestamp>-->
|
||||||
|
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
|
||||||
|
<!--解决Could not find or load main class ${start-class} -->
|
||||||
|
<mainClass>com.bpo.BpoSignAppllication</mainClass>
|
||||||
|
<!-- 设置时区 -->
|
||||||
|
<environment>
|
||||||
|
<TZ>Asia/Shanghai</TZ>
|
||||||
|
</environment>
|
||||||
</container>
|
</container>
|
||||||
|
<allowInsecureRegistries>true</allowInsecureRegistries>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<!-- 解决maven工程是父子结构的 mvn compile-->
|
||||||
|
<!-- 把 jib 绑定到 Maven 命令中-->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>install</phase> <!-- 表示执行mvn install命令的时候就会自动构建镜像了-->
|
||||||
|
<goals>
|
||||||
|
<goal>${jib.key}</goal><!-- 表示执行的jib命令 是dockerBuild 还是build-->
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue