Skip to content

Add ctr images tag subcommand#3388

Merged
estesp merged 1 commit intocontainerd:masterfrom
seemethere:image_tag
Jul 8, 2019
Merged

Add ctr images tag subcommand#3388
estesp merged 1 commit intocontainerd:masterfrom
seemethere:image_tag

Conversation

@seemethere
Copy link
Copy Markdown
Contributor

Adds a subcommand for tagging images managed by containerd.

Usage:

ctr images tag docker.io/library/alpine:latest docker.io/library/alpine:new

Comes with a --force flag to allow you to gracefully overwrite image references
that already exist.

ctr images tag --force docker.io/library/alpine:latest docker.io/library/alpine:new

Also supports tagging to multiple images as well:

ctr images tag docker.io/library/alpine:latest docker.io/library/alpine:new docker.io/library/alpine:hello

Signed-off-by: Eli Uriegas [email protected]

@seemethere seemethere changed the title Add image tag subcommand Add ctr images tag subcommand Jul 2, 2019
@seemethere seemethere force-pushed the image_tag branch 2 times, most recently from cac41b0 to c4fb865 Compare July 2, 2019 23:31
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 2, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3388 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3388   +/-   ##
=======================================
  Coverage   45.05%   45.05%           
=======================================
  Files         113      113           
  Lines       12563    12563           
=======================================
  Hits         5660     5660           
  Misses       6049     6049           
  Partials      854      854
Flag Coverage Δ
#linux 48.98% <ø> (ø) ⬆️
#windows 40.27% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 876c889...c4fb865. Read the comment docs.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 3, 2019

Codecov Report

Merging #3388 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3388   +/-   ##
=======================================
  Coverage   45.05%   45.05%           
=======================================
  Files         113      113           
  Lines       12563    12563           
=======================================
  Hits         5660     5660           
  Misses       6049     6049           
  Partials      854      854
Flag Coverage Δ
#linux 48.98% <ø> (ø) ⬆️
#windows 40.27% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1c710a...af93e40. Read the comment docs.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2019

Build succeeded.

Copy link
Copy Markdown

@selansen selansen left a comment

Choose a reason for hiding this comment

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

Thanks for the commit.

LGTM

Comment thread cmd/ctr/commands/images/tag.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be less likely to hit a race here if instead of Delete, try Create first, then if already exists returns and force is given, then perform an Update.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll update the PR to do that instead.

@seemethere
Copy link
Copy Markdown
Contributor Author

PR has been updated to change the --force flow to attempt a Create first, then only do Delete if IsAlreadyExists.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 3, 2019

Build succeeded.

Comment thread cmd/ctr/commands/images/tag.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how about <target_ref> [<target_ref>, ...]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added this

Adds a subcommand for tagging images managed by containerd.

Usage:

  ctr images tag docker.io/library/alpine:latest docker.io/library/alpine:new

Comes with a --force flag to allow you to gracefully overwrite image references
that already exist.

Signed-off-by: Eli Uriegas <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Jul 6, 2019

Build succeeded.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit d80513e into containerd:master Jul 8, 2019
@seemethere seemethere deleted the image_tag branch July 8, 2019 18:51
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.

7 participants