Skip to content

Option to only tag images at end of bake #1089

Description

@ciaranmcnulty

Currently bake --push will tag images in the remote registry as they are completed. This can be an issue if later images in the same high-level build error out.

Either the default behaviour could change, or a CLI option could be added that forces tagging to only happen at the end - I don't think pushing new layers would need to be held back.

This example results in a foo tag but not the bar one:

FROM alpine:3.15 as foo
FROM alpine:3.15 as bar
RUN sleep 30 && exit 1
group "default" {
  targets = ["foo", "bar"]
}

target "foo" {
  target = "foo"
  tags = [
    "ciaranmcnulty/test:foo"
  ]
}

target "bar" {
  target = "bar"
  tags = [
    "ciaranmcnulty/test:bar"
  ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions