diff --git a/docs/deployment/registry-management.md b/docs/deployment/registry-management.md index 0e6c56e52..c55b22fce 100644 --- a/docs/deployment/registry-management.md +++ b/docs/deployment/registry-management.md @@ -124,4 +124,3 @@ dokku registry:set node-js-app push-on-release # globally dokku registry:set --global push-on-release ``` - diff --git a/plugins/registry/functions.go b/plugins/registry/functions.go index 3b5ecf13a..62d85812a 100644 --- a/plugins/registry/functions.go +++ b/plugins/registry/functions.go @@ -17,11 +17,15 @@ func getRegistryServerForApp(appName string) string { value = common.PropertyGet("registry", "--global", "server") } - value = strings.TrimSuffix(value, "/") + "/" - if value == "hub.docker.com/" || value == "docker.io/" { + value = strings.TrimSuffix(value, "/") + if value == "hub.docker.com" || value == "docker.io" { value = "" } + if value != "" { + value = value + "/" + } + return value }