docker / docker/buildx

Option to only tag images at end of bake

Open
#1,089 4 comments 9 reactions 1 assignee View on GitHub

@jedevc is already working on this.

Since Jul 4, 2022.

area/bake
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

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"
  ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.