Container Image
Build container images with tools and best practices.
Clone
git clone https://github.com/saturnism/jvm-helloworld-by-example
cd jvm-helloworld-by-example/helloworld-springboot-tomcatBuild
./mvnw packageEnable API
gcloud services enable containerregistry.googleapis.comContainerize
Build and Push
PROJECT_ID=$(gcloud config get-value project)
./mvnw compile com.google.cloud.tools:jib-maven-plugin:2.4.0:build \
-Dimage=gcr.io/${PROJECT_ID}/helloworld# Paketo Buildpack
PROJECT_ID=$(gcloud config get-value project)
pack build \
--builder gcr.io/paketo-buildpacks/builder:base \
--publish \
gcr.io/${PROJECT_ID}/helloworld
# GCP Buildpack
PROJECT_ID=$(gcloud config get-value project)
pack build \
--builder gcr.io/buildpacks/builder:v1 \
--publish \
gcr.io/${PROJECT_ID}/helloworldBuild Locally
Run Locally
Connect Locally
Last updated
Was this helpful?