Skip to content

Commit

Permalink
Fix bug with docker registry
Browse files Browse the repository at this point in the history
  • Loading branch information
keimoon committed May 7, 2018
1 parent 009406c commit 9b7dd60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// Version returns doriath version
func Version() string {
return "1.4.0"
return "1.4.1"
}

// ResolveDir appends a path to a rootDir
Expand Down
4 changes: 3 additions & 1 deletion utils/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
// Default values
const (
DefaultRegistryName = "dockerhub"
DefaultRegistry = "https://registry-1.docker.io"
DefaultRegistry = "https://registry.hub.docker.com"
)

var fromRegex = regexp.MustCompile("^[fF][rR][oO][mM]\\s+")
Expand Down Expand Up @@ -242,6 +242,8 @@ func dockerRequestToken(shortName string, authInfo *dockerAuthInfo, credential *
tokenQueryParams.Add("service", authInfo.service)
if authInfo.scope == "" {
tokenQueryParams.Add("scope", "repository:"+shortName+":*")
} else {
tokenQueryParams.Add("scope", authInfo.scope)
}
tokenURL := authInfo.realm + "?" + tokenQueryParams.Encode()
request, err := http.NewRequest("GET", tokenURL, nil)
Expand Down

0 comments on commit 9b7dd60

Please sign in to comment.