Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion cloudbank-v5/customer-helidon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,34 @@ This creates:
libs/ (all dependency JARs)
```

### Building and Pushing Container Image

#### Environment Setup (macOS with Rancher Desktop)

```bash
# Set Docker host for JKube compatibility
export DOCKER_HOST=unix:///Users/$USER/.rd/docker.sock
```

#### Commands

```bash
# Build thin JAR and libs
mvn clean package

# Build container image
mvn k8s:build

# Push to Oracle Cloud Registry
docker push us-ashburn-1.ocir.io/tenancy/customer-helidon:5.0-SNAPSHOT
```

#### Output
- **JAR**: `target/customer-helidon.jar` (thin JAR)
- **Dependencies**: `target/libs/` (all dependencies)
- **Deployment**: `target/customer-helidon-deployment.zip`
- **Image**: Uses JKube Java base image with automatic Helidon configuration

### Running the Application

**Option 1: Using the thin JAR (requires dependencies in classpath):**
Expand Down Expand Up @@ -119,9 +147,19 @@ The generation of the executable binary may take a few minutes to complete depen

## Docker Support

### Building the Docker Image
### Building the Docker Image Locally

**Note:** The `Dockerfile.manual` must be renamed to `Dockerfile` before building locally, as JKube uses the Dockerfile when present.

```bash
# Rename Dockerfile for local build
git mv Dockerfile.manual Dockerfile

# Build the Docker image
docker build -t customer-helidon .

# Rename back to avoid conflicts with JKube builds
git mv Dockerfile Dockerfile.manual
```

### Running the Docker Image
Expand Down
21 changes: 20 additions & 1 deletion cloudbank-v5/customer-helidon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
</parent>
<groupId>com.example</groupId>
<artifactId>customer-helidon</artifactId>
<version>1.0-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>

<properties>
<helidon-maven-plugin.version>4.0.14</helidon-maven-plugin.version>
<jkube.version>1.16.2</jkube.version>
<jkube.generator.name>us-ashburn-1.ocir.io/tenancy/${project.artifactId}:${project.version}</jkube.generator.name>
</properties>

<dependencies>
<dependency>
Expand Down Expand Up @@ -46,6 +52,7 @@
<dependency>
<groupId>io.helidon.integrations.eureka</groupId>
<artifactId>helidon-integrations-eureka</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.helidon.integrations.cdi</groupId>
Expand Down Expand Up @@ -215,6 +222,18 @@
</execution>
</executions>
</plugin>
<!-- Helidon Maven Plugin for native image support -->
<plugin>
<groupId>io.helidon.build-tools</groupId>
<artifactId>helidon-maven-plugin</artifactId>
<version>${helidon-maven-plugin.version}</version>
</plugin>
<!-- Eclipse JKube for container image building -->
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<version>${jkube.version}</version>
</plugin>
</plugins>

<pluginManagement>
Expand Down