yahoo / CMAK

CMAK is a tool for managing Apache Kafka clusters
Apache License 2.0
11.84k stars 2.5k forks source link

Invoking sbt docker yields java.lang.RuntimeException: Could not parse image id #815

Open maurolscla opened 4 years ago

maurolscla commented 4 years ago

I'm trying to build the current version of CMAK invoking sbt docker. The build process seems to go on ok until the very end when I get a RuntimeException. Here are the logs:

➜  CMAK git:(master) ./sbt docker
[info] Loading settings for project cmak-build from plugins.sbt ...
[info] Loading project definition from /Users/mauro/repos/exploring/CMAK/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to cmak (in build file:/Users/mauro/repos/exploring/CMAK/)
[info] Wrote /Users/mauro/repos/exploring/CMAK/target/scala-2.12/cmak_2.12-3.0.0.5.pom
[success] All package validations passed
[info] Your package is ready in /Users/mauro/repos/exploring/CMAK/target/universal/cmak-3.0.0.5.zip
[info] #1 [internal] load .dockerignore
[info] #1 transferring context: 2B 0.0s done
[info] #1 DONE 0.0s
[info] #2 [internal] load build definition from Dockerfile
[info] #2 transferring dockerfile: 288B 0.0s done
[info] #2 DONE 0.0s
[info] #3 [internal] load metadata for docker.io/library/openjdk:11-jre-slim
[info] #3 DONE 1.6s
[info] #4 [1/6] FROM docker.io/library/openjdk:11-jre-slim@sha256:b442a8eec84893fe...
[info] #4 DONE 0.0s
[info] #6 [internal] load build context
[info] #6 transferring context: 100.01MB 2.0s done
[info] #6 DONE 2.0s
[info] #5 [2/6] RUN apt-get update && apt-get install -y --no-install-recommends u...
[info] #5 CACHED
[info] #7 [3/6] ADD 0/cmak-3.0.0.5.zip /opt/cmak.zip
[info] #7 DONE 0.3s
[info] #8 [4/6] WORKDIR /opt
[info] #8 DONE 0.0s
[info] #9 [5/6] RUN ["unzip", "cmak.zip"]
[info] #9 0.253 Archive:  cmak.zip
<<I omitted the inflating logs for brevity’s sake>>
[info] #9 DONE 1.6s
[info] #10 [6/6] RUN ["rm", "-f", "cmak.zip"]
[info] #10 DONE 0.3s
[info] #11 exporting to image
[info] #11 exporting layers
[info] #11 exporting layers 0.7s done
[info] #11 writing image sha256:a036005df45db3a5c2aca3e5bf0ce540498b83d5cf8be39445e3349d597990b5 done
[info] #11 DONE 0.8s
[error] java.lang.RuntimeException: Could not parse image id
[error]     at scala.sys.package$.error(package.scala:30)
[error]     at sbtdocker.DockerBuild$.build(DockerBuild.scala:99)
[error]     at sbtdocker.DockerBuild$.buildAndTag(DockerBuild.scala:72)
[error]     at sbtdocker.DockerBuild$.apply(DockerBuild.scala:45)
[error]     at sbtdocker.DockerBuild$.apply(DockerBuild.scala:24)
[error]     at sbtdocker.DockerSettings$.$anonfun$baseDockerSettings$1(DockerSettings.scala:17)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]     at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]     at sbt.Execute.work(Execute.scala:290)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]     at java.base/java.lang.Thread.run(Thread.java:834)
[error] (docker) Could not parse image id
[error] Total time: 16 s, completed Nov. 13, 2020, 11:48:40 a.m.
Taqas commented 3 years ago

I had the same problem, updating both the sbt version and sbt-docker version solved it

ninahaack commented 3 years ago

Hey, I'm quite new with scala, I'm having the same problem :( @Taqas which version do you have for both? and how did you upgraded sbt-docker? thank you in advance

Taqas commented 3 years ago

@ninahaack for sbt I updated to the latest stable version, 1.4.9. To update sbt-docker you can update the version number in project/plugins.sbt, i.e. addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.8.2").

subinsoman commented 1 year ago

any help pls not possible to update sbt .so many dependensies not available