Combine multi-tag builds into one buildx command using multiple --tag options

Open Beginner friendly
#12 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
docker, shell
Domain
build-system

Research direction

Open the Makefile around line 68 and compare the two existing docker buildx commands with the proposed combined command. Confirm that the release tag and major/minor moving tag are both passed with --tag in one buildx invocation, and verify the resulting command preserves the existing builder, platforms, push behavior, and image names.

Written by the indexing model from the issue text.

Description

good first issue polish

Currently, we build (and push) the image twice when tagging a release with both the full tag (ie 1.2.3) and the major/minor moving tag (ie 1.2).

buildx now (or always?) supports multiple --tag options so we can tag and push from a single build.

We can change this:

	@docker buildx build --builder http-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:$(shell echo ${TAG} | rev | cut -d '.' -f2- | rev ) .
	@docker buildx build --builder http-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:${TAG} .

to this:

	@docker buildx build --builder http-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:${TAG} --tag ${IMAGE}:$(shell echo ${TAG} | rev | cut -d '.' -f2- | rev ) .
Dominant language
Shell
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

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.

More from jgriff/http-resource

All issues in jgriff/http-resource

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.