Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error response from daemon: image not found with digest #133

Open
EvgenyAfanasev opened this issue Sep 9, 2023 · 0 comments
Open

Error response from daemon: image not found with digest #133

EvgenyAfanasev opened this issue Sep 9, 2023 · 0 comments

Comments

@EvgenyAfanasev
Copy link

EvgenyAfanasev commented Sep 9, 2023

My dockerfile config:

lazy val dockerSettings = Seq(
  docker / dockerfile := {
    val jarFile: File = 
      (Compile / packageBin / sbt.Keys.`package`).value
    val jarTarget = s"/app/${jarFile.getName}"
    val classpath = 
      (Compile / managedClasspath).value
    val mainclass = 
      (Compile / packageBin / mainClass).value
        .getOrElse(sys.error("Expected exactly one main class"))
    val classpathString =
      classpath.files
        .map("/app/" + _.getName)
        .mkString(":") + ":" + jarTarget

    immutable.Dockerfile.empty
      .from("alpine:3.18.2")
      .addRaw("https://download.oracle.com/java/17/archive/jdk-17.0.8_linux-x64_bin.tar.gz", "/tmp")
      .run("tar", "-xzf", "/tmp/jdk-17.0.8_linux-x64_bin.tar.gz", "-C", "/opt")
      .run("rm", "/tmp/jdk-17.0.8_linux-x64_bin.tar.gz")
      .run("apk", "add", "dpkg")
      .run("update-alternatives", "--install", "/usr/bin/java", "java", "/opt/jdk-17.0.8/bin/java", "1")
      .run("update-alternatives", "--install", "/usr/bin/javac", "javac", "/opt/jdk-17.0.8/bin/javac", "1")
      .add(classpath.files, "/app/")
      .add(jarFile, jarTarget)
      .entryPoint("java", "-cp", classpathString, mainclass)
  },
  docker / imageNames := Seq(
    ImageName(
      namespace = Some(organization.value),
      repository = name.value,
      tag = Some(version.value)
    )
  )
)

at the end of running task "docker" I see error:

[info] #15 exporting layers
[info] #15 exporting layers 16.7s done
[info] #15 exporting manifest sha256:509191d84ea7d9573e9f7ce1ea009126085bb1f2cc8eb026bfa5c967df80da10 0.0s done
[info] #15 exporting config sha256:b3cb353401738dc76203aa6e2e5c3e3dd8826de7fbaf08941ad94663993493ad
[info] #15 exporting config sha256:b3cb353401738dc76203aa6e2e5c3e3dd8826de7fbaf08941ad94663993493ad 0.0s done
[info] #15 DONE 16.7s
[info] Tagging image b3cb353401738dc76203aa6e2e5c3e3dd8826de7fbaf08941ad94663993493ad with name: ru.codemagic.platform/knowledge-api:0.1.0-SNAPSHOT
[info] Error response from daemon: image not found with digest
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error] at scala.sys.package$.error(package.scala:30)
[error] at scala.sys.process.BasicIO$Streamed$.next$1(BasicIO.scala:53)
[error] at scala.sys.process.BasicIO$Streamed$.$anonfun$apply$4(BasicIO.scala:56)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.lineStream(ProcessBuilderImpl.scala:150)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.lineStream(ProcessBuilderImpl.scala:114)
[error] at scala.sys.process.ProcessBuilder.lines(ProcessBuilder.scala:194)
[error] at scala.sys.process.ProcessBuilder.lines$(ProcessBuilder.scala:194)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.lines(ProcessBuilderImpl.scala:91)
[error] at sbtdocker.DockerTag$.apply(DockerTag.scala:23)
[error] at sbtdocker.DockerBuild$.$anonfun$buildAndTag$1(DockerBuild.scala:99)
[error] at sbtdocker.DockerBuild$.$anonfun$buildAndTag$1$adapted(DockerBuild.scala:98)
[error] at scala.collection.immutable.List.foreach(List.scala:431)
[error] at sbtdocker.DockerBuild$.buildAndTag(DockerBuild.scala:98)
[error] at sbtdocker.DockerBuild$.apply(DockerBuild.scala:68)
[error] at sbtdocker.DockerBuild$.apply(DockerBuild.scala:38)
[error] at sbtdocker.DockerSettings$.$anonfun$baseDockerSettings$1(DockerSettings.scala:19)
[error] at sbtdocker.DockerSettings$.$anonfun$baseDockerSettings$1$adapted(DockerSettings.scala:11)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] at sbt.Execute.work(Execute.scala:292)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] at java.base/java.lang.Thread.run(Thread.java:858)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant