Skip to content

Commit

Permalink
Merge pull request #140 from LazyR0t/fix-for-dangling-image
Browse files Browse the repository at this point in the history
Handle case where a dangling image is built, and an older SHA is matched during a docker build
  • Loading branch information
marcus-drake authored Dec 12, 2024
2 parents d4177d3 + 6181cc7 commit 2a20638
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 @@ -198,6 +198,7 @@ object DockerBuild {

private val SuccessfullyBuilt = "^Successfully built ([0-9a-f]+)$".r
private val SuccessfullyBuiltBuildKit = ".* writing image sha256:([0-9a-f]+) .*\\bdone$".r
private val SuccessfullyBuiltBuildxDangling = ".* naming to moby-dangling@sha256:([0-9a-f]+) .*\\bdone$".r
private val SuccessfullyBuiltContainerd = ".* exporting manifest list 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
Expand All @@ -207,6 +208,7 @@ object DockerBuild {
lines.collect {
case SuccessfullyBuilt(id) => ImageId(id)
case SuccessfullyBuiltBuildKit(id) => ImageId(id)
case SuccessfullyBuiltBuildxDangling(id) => ImageId(id)
case SuccessfullyBuiltContainerd(id) => ImageId(id)
case SuccessfullyBuiltBuildx(id) => ImageId(id)
case SuccessfullyBuiltPodman(id) => ImageId(id)
Expand Down

0 comments on commit 2a20638

Please sign in to comment.