0%

docker_jib

google jib容器打包工具试用

Building Docker Image for a Spring Boot App With Jib

使用 Jib 生成 Java Docker 镜像

github GoogleContainerTools

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<build>
<finalName>suidifu-discovery-eureka</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>0.9.11</version>
<configuration>
<from>
<image>registry.hub.docker.com/openjdk:8-jdk-alpine</image>
</from>
<to>
<image>registry.cn-hangzhou.aliyuncs.com/andrewchen/spring-boot-example</image>
<auth>
<username>chendufu</username>
<password>habwaD-wiske5-jecxyc</password>
</auth>
</to>
<container>
<jvmFlags>
<jvmFlag>-Xms256M</jvmFlag>
</jvmFlags>
<mainClass>com.suidifu.discovery.eureka.SuidifuDiscoveryEurekaApplication</mainClass>
<ports>
<port>8080</port>
</ports>
</container>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>dockerBuild</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>