I am using jib to build my spring boot war file for tomcat.
I am using a local tomcat docker image.
I use gradle jibDockerBuild --stacktrace and i get the following error:
caused by: com.google.cloud.tools.jib.image.json.BadContainerConfigurationFormatException: Invalid volume path: [
at com.google.cloud.tools.jib.image.json.JsonToImageTranslator.volumeMapToSet(JsonToImageTranslator.java:268)
at com.google.cloud.tools.jib.image.json.JsonToImageTranslator.configureBuilderWithContainerConfiguration(JsonToImageTranslator.java:201)
at com.google.cloud.tools.jib.image.json.JsonToImageTranslator.toImage(JsonToImageTranslator.java:137)
at com.google.cloud.tools.jib.builder.steps.LocalBaseImageSteps.lambda$returnImageAndRegistryClientStep$2(LocalBaseImageSteps.java:171)
at com.google.cloud.tools.jib.builder.steps.StepsRunner.lambda$assignLocalImageResult$4(StepsRunner.java:289)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
I am able to run the image with docker run and docker-compose.
Any ideas?
Thanks, B
Your base tomcat image in the local Docker daemon has incorrect volume configuration values. We have seen the exact same case in the past.
In that case,
docker inspect
showed thatVolumes
was set towhich is a map from string (volume path) -> literal {}, meaning that it defines three volume paths (map entries):
[
,]
,“/sys/fs/cgroupâ€
. And of course,]
and[
are not a valid absolute UNIX path.A correct setting will look like
where each entry is a map from an absolute UNIX path to
{}
.Fixing the
Volumes
configuration of your tomcat image will resolve the issue.