GoogleContainerTools / jib

🏗 Build container images for your Java applications.
Apache License 2.0
13.52k stars 1.42k forks source link

Jib CLI base image cache problem #4230

Closed scrat98 closed 4 weeks ago

scrat98 commented 3 months ago

Jib cli not released with latest jib-core version. As a result it leads to already fixed issue https://github.com/GoogleContainerTools/jib/pull/3974

Steps to repro:

1) jib.yaml

apiVersion: jib/v1alpha1
kind: BuildFile

from:
  image: "nginx:1.25.4-alpine@sha256:31bad00311cb5eeb8a6648beadcf67277a175da89989f14727420a80e2e76742"

2) Execute command twice (to make cache work) jib build --target=docker://jib-cli-quickstart

3) Error

java.util.concurrent.ExecutionException: java.lang.ClassCastException: class com.google.cloud.tools.jib.image.json.OciIndexTemplate cannot be cast to class com.google.cloud.tools.jib.image.json.V22ManifestListTemplate (com.google.cloud.tools.jib.image.json.OciIndexTemplate and com.google.cloud.tools.jib.image.json.V22ManifestListTemplate are in unnamed module of loader 'app')

Workaround: build jib cli from source

blakeli0 commented 4 weeks ago

Release v0.13.0 should have this fix.