set default registry server-addres for Docker HUB images

This commit is contained in:
Renno Reinurm 2017-01-26 22:34:15 +02:00
parent ce321242bf
commit 1046cf2731
2 changed files with 7 additions and 1 deletions

4
.gitignore vendored
View file

@ -1,3 +1,5 @@
watchtower
vendor
.glide
.glide
debug
.vscode

View file

@ -61,6 +61,10 @@ func (c Container) ImageName() string {
imageName = fmt.Sprintf("%s:latest", imageName)
}
if strings.Count(imageName, "/") == 1 {
imageName = strings.Join([]string{"index.docker.io/", imageName}, "")
}
return imageName
}