Skip to content

Commit

Permalink
feat(docker): Handling official image
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed May 22, 2021
1 parent 2aef213 commit de3e4af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func (a app) LatestVersions(repository string, patterns []string) (map[string]se
return nil, fmt.Errorf("unable to prepare pattern matching: %s", err)
}

if !strings.Contains(repository, "/") {
repository = fmt.Sprintf("library/%s", repository)
}

bearerToken, err := a.login(ctx, repository)
if err != nil {
return nil, fmt.Errorf("unable to login to registry: %s", err)
Expand Down

0 comments on commit de3e4af

Please sign in to comment.