Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Replace docker.io with index.docker.io in ImageID
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Broughton committed Aug 10, 2017
1 parent 4a9b9cf commit 49be450
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions image.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
const (
dockerHubHost = "index.docker.io"
dockerHubLibrary = "library"

oldDockerHubHost = "docker.io"
)

var (
Expand Down Expand Up @@ -61,6 +63,10 @@ func ParseImageID(s string) (ImageID, error) {
img.Namespace = parts[0]
img.Image = parts[1]
case 3:
// Replace docker.io with index.docker.io (#692)
if parts[0] == oldDockerHubHost {
parts[0] = dockerHubHost
}
img.Host = parts[0]
img.Namespace = parts[1]
img.Image = parts[2]
Expand Down

0 comments on commit 49be450

Please sign in to comment.