diff --git a/cloudbank-v5/customer-helidon/Dockerfile b/cloudbank-v5/customer-helidon/Dockerfile.manual similarity index 100% rename from cloudbank-v5/customer-helidon/Dockerfile rename to cloudbank-v5/customer-helidon/Dockerfile.manual diff --git a/cloudbank-v5/customer-helidon/README.md b/cloudbank-v5/customer-helidon/README.md index 802a04eca..ddc66ac80 100644 --- a/cloudbank-v5/customer-helidon/README.md +++ b/cloudbank-v5/customer-helidon/README.md @@ -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):** @@ -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 diff --git a/cloudbank-v5/customer-helidon/pom.xml b/cloudbank-v5/customer-helidon/pom.xml index 476b23283..ddf2f5076 100644 --- a/cloudbank-v5/customer-helidon/pom.xml +++ b/cloudbank-v5/customer-helidon/pom.xml @@ -11,7 +11,13 @@ com.example customer-helidon - 1.0-SNAPSHOT + 5.0-SNAPSHOT + + + 4.0.14 + 1.16.2 + us-ashburn-1.ocir.io/tenancy/${project.artifactId}:${project.version} + @@ -46,6 +52,7 @@ io.helidon.integrations.eureka helidon-integrations-eureka + runtime io.helidon.integrations.cdi @@ -215,6 +222,18 @@ + + + io.helidon.build-tools + helidon-maven-plugin + ${helidon-maven-plugin.version} + + + + org.eclipse.jkube + kubernetes-maven-plugin + ${jkube.version} +