Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extra tags to be provided for tagging the manifest list #32

Merged
merged 1 commit into from
Jun 15, 2017

Conversation

estesp
Copy link
Owner

@estesp estesp commented Jun 14, 2017

Provide the ability to add "tags: [ .. ]" to the input YAML with a list
of additional tags to push to the registry against the manifest list
object being pushed.

Signed-off-by: Phil Estes [email protected]

Fixes: #23

And..seems to work :)

DEBU[0009] [extra tag "1.8"] push url: https://registry-1.docker.io/v2/estesp/bbimg/manifests/1.8
DEBU[0010] [extra tag "fred"] push url: https://registry-1.docker.io/v2/estesp/bbimg/manifests/fred
DEBU[0010] [extra tag "wilma"] push url: https://registry-1.docker.io/v2/estesp/bbimg/manifests/wilma
DEBU[0011] [extra tag "1.8-alpine"] push url: https://registry-1.docker.io/v2/estesp/bbimg/manifests/1.8-alpine
DEBU[0011] [extra tag "wilson-99"] push url: https://registry-1.docker.io/v2/estesp/bbimg/manifests/wilson-99
Digest: sha256:4b1a552465dd5a332c585fb1855d8db6592add9ada7d0583b0d3c92a20d74ca7

return "", fmt.Errorf("Registry push unsuccessful: response %d: %s", resp.StatusCode, resp.Status)
}
// if the YAML includes additional tags, push the added tag references. No other work
// should be required as we have already
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this comment intended to sound like a cliffhanger? (feels like it ends in the middle of a sentence)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building up interest sometimes takes introducing a bit of PR-style mystery around things ;) =)

Real story: saw that I forgot to type the rest, got hungry for lunch and decided I could take care of pushing an update later :)

@tianon
Copy link
Contributor

tianon commented Jun 14, 2017

I can definitely work with this, no problem!!! ❤️ ❤️ ❤️

This should give us a really dramatic speedup!

(Now I want the same thing for docker push itself! hahahaha 😇)

Provide the ability to add "tags: [ .. ]" to the input YAML with a list
of additional tags to push to the registry against the manifest list
object being pushed.

Signed-off-by: Phil Estes <[email protected]>
@estesp
Copy link
Owner Author

estesp commented Jun 14, 2017

(Now I want the same thing for docker push itself! hahahaha 😇)

Not too far-fetched.. basically I would call it something like docker rtag for remote tag operation? But maybe it can fit into the docker manifest workflow? It does require the code to fetch the actual manifest being tagged (as it ends up being a POST of that JSON bytestream to a different URL (with the tag reference), but that would be dramatically less work than gathering up all the manifest details, blob mounting, etc..

@tianon
Copy link
Contributor

tianon commented Jun 14, 2017

Yeah, that'd be awesome, and it looks like @StefanScherer figured out how to make it do exactly that (docker/cli#138 (comment))! 😄

We spend a lot of time doing docker push on the official images build server, and it ends up spending way more time than it needs to re-reading layers from disk to recreate blobs that end up being identical and no-op. 😞

@funkyfuture
Copy link

it'd be great to have that feature reflected in the README.

@nitkon
Copy link

nitkon commented May 6, 2018

Can we add additional tags using the "manifest-tool push from-args ..." command?

@estesp
Copy link
Owner Author

estesp commented May 15, 2018

@nitkon this would require a PR to connect a new flag (--extra-tags?) to the capability that is currently only driven by the YAML format. Would you be interested in submitting that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants