mirror of
https://github.com/containrrr/watchtower.git
synced 2026-02-17 20:58:08 +01:00
move from dep to go module and switch version of docker client api to avoid Sirupsen issue
This commit is contained in:
parent
1b749def8f
commit
d44c6e7ddc
5 changed files with 190 additions and 550 deletions
|
|
@ -5,12 +5,12 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/cli/cli/command"
|
||||
cliconfig "github.com/docker/cli/cli/config"
|
||||
"github.com/docker/cli/cli/config/configfile"
|
||||
"github.com/docker/cli/cli/config/credentials"
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/reference"
|
||||
"github.com/docker/docker/cli/command"
|
||||
"github.com/docker/docker/cliconfig"
|
||||
"github.com/docker/docker/cliconfig/configfile"
|
||||
"github.com/docker/docker/cliconfig/credentials"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
|
@ -68,11 +68,13 @@ func EncodedConfigAuth(ref string) (string, error) {
|
|||
}
|
||||
|
||||
func ParseServerAddress(ref string) (string, error) {
|
||||
repository, _, err := reference.Parse(ref)
|
||||
|
||||
parsedRef, err := reference.Parse(ref)
|
||||
if err != nil {
|
||||
return ref, err
|
||||
}
|
||||
parts := strings.Split(repository, "/")
|
||||
|
||||
parts := strings.Split(parsedRef.String(), "/")
|
||||
return parts[0], nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue