Skip to content

Commit 99c7dc8

Browse files
product-service-docker: jib and maven build
1 parent 37dd720 commit 99c7dc8

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
services:
22
product-service:
33
container_name: product
4+
# image: amigoscode/product-service:jibMaven
45
build:
56
context: .
67
dockerfile: Dockerfile

pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
</scm>
3030
<properties>
3131
<java.version>21</java.version>
32+
<docker.username>amigoscode</docker.username>
33+
<docker.image.name>product-service</docker.image.name>
34+
<docker.image.tag/>
3235
</properties>
3336
<dependencies>
3437
<dependency>
@@ -75,6 +78,32 @@
7578
<groupId>org.springframework.boot</groupId>
7679
<artifactId>spring-boot-maven-plugin</artifactId>
7780
</plugin>
81+
<plugin>
82+
<groupId>com.google.cloud.tools</groupId>
83+
<artifactId>jib-maven-plugin</artifactId>
84+
<version>3.3.2</version>
85+
<configuration>
86+
<from>
87+
<image>eclipse-temurin:21-jre</image>
88+
<platforms>
89+
<platrom>
90+
<architecture>amd64</architecture>
91+
<os>linux</os>
92+
</platrom>
93+
<platrom>
94+
<architecture>arm64</architecture>
95+
<os>linux</os>
96+
</platrom>
97+
</platforms>
98+
</from>
99+
<to>
100+
<image>docker.io/${docker.username}/${docker.image.name}:${docker.image.tag}</image>
101+
<tags>
102+
<tag>latest</tag>
103+
</tags>
104+
</to>
105+
</configuration>
106+
</plugin>
78107
</plugins>
79108
</build>
80109

0 commit comments

Comments
 (0)