mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
set default registry server-addres for Docker HUB images
This commit is contained in:
parent
ce321242bf
commit
1046cf2731
2 changed files with 7 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
watchtower
|
||||
vendor
|
||||
.glide
|
||||
.glide
|
||||
debug
|
||||
.vscode
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue