GoogleContainerTools / GoogleContainerTools/jib

Build base - extension projects with JIB

Open
#4,383 0 comments 0 reactions 0 assignees View on GitHub
priority:p3 type: feature request
Dominant language
Java
Stars
14.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

**Environment**:

- *Jib version:* 3.4.3
- *Build tool:* Maven 3.9.6
- *OS:* Linux/Ubuntu

**Description of the issue**:
I have a Spring Boot project that I build as base image and I a have a second project that extends the functionality of the base image. The second project is loaded as dependency in the classpath of the base project (sort of like a plugin). I built the base image with jib and I got a working image. I'm trying to use the base image to build the extension project with jib and have it packaged in a new image that run the base application

**Expected behavior**:
Maintain the base image structure, main class, entrypoint... while adding the extension project and its dependencies as dependency to the base image and packaged it into a new image

**Steps to reproduce**:

1. Create a Spring Boot project and build it with JIB as base image
2. Create a second project that implements a functionality from the base project and is used as a plugin by the base project
3. Build the second project with jib with image from as base image

**`jib-maven-plugin` Configuration**:
Base Project
```xml

com.google.cloud.tools
jib-maven-plugin
3.4.3


eclispe-temurin:21-jre


base-image




installing
install

build


```

Extension Project
```xml

com.google.cloud.tools
jib-maven-plugin
3.4.3


base-image


extended-image


INHERIT




installing
install

build


```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.