Skip to content

Commit

Permalink
Don't throw away user-specified tag for pull --all-tags
Browse files Browse the repository at this point in the history
Right now, we (conceptually unnecesarily) require an image with an existing
tag on the remote repository to list all other tags.

Given that, use the user-specified name:tag, if any, instead of discarding the
tag and requiring :latest to exist on the remote registry.

Signed-off-by: Miloslav Trmač <[email protected]>

Closes: #1361
Approved by: rhatdan
  • Loading branch information
mtrmac authored and rh-atomic-bot committed Feb 27, 2019
1 parent 430f3dc commit 0de7cac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func Pull(ctx context.Context, imageName string, options PullOptions) error {
}

repo := reference.TrimNamed(storageRef.DockerReference())
dockerRef, err := alltransports.ParseImageName(transport + repo.Name())
dockerRef, err := alltransports.ParseImageName(transport + storageRef.DockerReference().String())
if err != nil {
return errors.Wrapf(err, "error getting repository tags")
}
Expand Down

0 comments on commit 0de7cac

Please sign in to comment.