Skip to content

Commit

Permalink
Fix not found imageId to tag when run with nerdctl
Browse files Browse the repository at this point in the history
  • Loading branch information
giabao committed Jun 6, 2023
1 parent c3f9aed commit b1ae654
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/sbtdocker/DockerBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,15 @@ object DockerBuild {
private val SuccessfullyBuiltBuildKit = ".* writing image sha256:([0-9a-f]+) .*\\bdone$".r
private val SuccessfullyBuiltBuildx = ".* exporting config sha256:([0-9a-f]+) .*\\bdone$".r
private val SuccessfullyBuiltPodman = "^([0-9a-f]{64})$".r
private val SuccessfullyBuiltNerdctl = "^Loaded image: .*sha256:([0-9a-f]+)$".r

private[sbtdocker] def parseImageId(lines: Seq[String]): Option[ImageId] = {
lines.collect {
case SuccessfullyBuilt(id) => ImageId(id)
case SuccessfullyBuiltBuildKit(id) => ImageId(id)
case SuccessfullyBuiltBuildx(id) => ImageId(id)
case SuccessfullyBuiltPodman(id) => ImageId(id)
case SuccessfullyBuiltNerdctl(id) => ImageId(id)
}.lastOption
}
}
Expand Down

0 comments on commit b1ae654

Please sign in to comment.